n = gets.chomp.to_i
letter = []
letter[1] = ['.',',','!','?',' ']
letter[2] = ['a','b','c']
letter[3] = ['d','e','f']
letter[4] = ['g','h','i']
letter[5] = ['j','k','l']
letter[6] = ['m','n','o']
letter[7] = ['p','q','r','s']
letter[8] = ['t','u','v']
letter[9] = ['w','x','y','z']
letter[0] = ['']

n.times do
    input_data = gets.chomp
    
    f = 0
    count = 0
    input_data.length.times do |i|
        g = input_data[i].to_i
        if g != 0
            f = g
            count += 1
        else
            print letter[f][(count - 1) % letter[f].length]
            f = 0
            count = 0
        end
    end
    puts
end

