n = gets.to_i
b = ["", ".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"]
buf = [0,0]
n.times do
    s = gets.chomp
    s.each_char do |c|
        if c == "0"
            print b[buf[0]][(buf[1] - 1) % b[buf[0]].size] if buf[0] != 0
            buf = [0,0]
            next
        end
        buf[0] = c.to_i
        buf[1] += 1
    end
    puts
end