while""do f=io.read():gfind"((%S)(.)%S*)"s=f()for _,a,b in f do s=s:gsub(".",{[a]=b,[b]=a})end print(s)end