key = ".,!? -abc-def-ghi-jkl-mno-pqrs-tuv-wxyz".split("-")

gets.to_i.times {
  inp = gets.split(//).map{|i|i.to_i}
  x = t = 0
  while x < inp.length
    if inp[x] == 0 && t != 0
      case inp[x-1]
      when 1
        print key[inp[x-1]-1][(t-1)%5]
      when 2..6, 8
        print key[inp[x-1]-1][(t-1)%3]
      when 7, 9
        print key[inp[x-1]-1][(t-1)%4]
      end
      t = 0
    elsif inp[x] != 0
      t += 1
    end
    x += 1
  end
  print "\n"
}