S = gets.chomp P = [ %w(pfnovu orange), %w(axqwuf cipher), %w(mbgrihcdejkolsty bqsuftlmdxynzvwj), ] C = Hash.new P.each do |from, to| from.chars.zip(to.chars) do |f, t| C[f] = t end end C['z'] = 'k' puts S.chars.map { |s| C[s] }.join