### constant

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

### main

klens = {}

for ch in KEYS.keys
  klens[ch] = KEYS[ch].length
end

n = gets.to_i

n.times do
  keystr = gets.strip
  #puts keystr

  ans = ''
  
  for word in keystr.split('0')
    next if word.empty?

    wch = word[0]
    ans += KEYS[wch][(word.length - 1) % klens[wch]]
  end

  puts ans
end