#
# Keitai Message
#

class Cellular < Hash
  def initialize
    @buf=[]
    reset
    self.store(1, %w". , ! ?"+[' '])
    self.store(2, %w"a b c")
    self.store(3, %w"d e f")
    self.store(4, %w"g h i")
    self.store(5, %w"j k l")
    self.store(6, %w"m n o")
    self.store(7, %w"p q r s")
    self.store(8, %w"t u v")
    self.store(9, %w"w x y z")
  end

  def push(b)
    if b=='0'
      enter
    else
      @ptr[0]=b.to_i
      @ptr[1]=@ptr[1]+1
      @ptr[1]-=self[@ptr[0]].size if @ptr[1]==self[@ptr[0]].size
    end
  end

  def reset
    @ptr=[0, -1]
  end

  def enter
    @buf<<self[@ptr[0]][@ptr[1]] if @ptr[0]>0
    reset
  end

  def message
    @buf.join('')
  end

end

gets.to_i.times do

  cell = Cellular.new
  gets.chomp.chars { |c| cell.push(c) }
  puts cell.message

end