while 1:print"".join(reduce(lambda a,(x,y):map({x:y,y:x}.get,a,a),raw_input().split()))