h={} [%w(pfnovu orange),%w(axqwuf cipher),%w(mbgrihcdejkolsty bqsuftlmdxynzvwj)].each{|a,b|a.chars.zip(b.chars){|i,j|h[i]=j}} puts gets.gsub(/./,h)