key = [[".",",","!","?"," "]]
key += [["a","b","c"]]
key += [["d","e","f"]]
key += [["g","h","i"]]
key += [["j","k","l"]]
key += [["m","n","o"]]
key += [["p","q","r","s"]]
key += [["t","u","v"]]
key += [["w","x","y","z"]]

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"
}