def readlines
  ncase = ARGF.gets.to_i
  ARGF.each_line.take(ncase).map(&:chomp)
end

KEYMAP = {
  "1" => ".,!? ",
  "2" => "abc",
  "3" => "def",
  "4" => "ghi",
  "5" => "jkl",
  "6" => "mno",
  "7" => "pqrs",
  "8" => "tuv",
  "9" => "wxyz"
}

def convert(line)
  line.scan(/(([1-9])\2*0)/).map { |s, _|
    set = KEYMAP[s[0]]
    set[(s.size-2) % set.size]
  }.join
end

readlines.each do |line|
  puts convert(line)
end