c = %{.,!? abc def ghi jkl mno pqrs tuv wxyz}.split
c[0] += ' '
gets.to_i.times do
  arr = []
  gets.chomp.split('').push('/').each_cons(2).reduce(1) do |t, (a, b)|
    if a != b
      arr << [a.to_i, t]
      t = 1
    else t += 1
    end
  end
  arr.each{|a, b| print c[a-1][(b - 1) % (c[a-1].size)] if a != 0 }
  puts
end