n = gets.to_i

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

n.times {
    gets.chomp.scan(/([^0]+)0+/).flatten(1).each{|s|
        cs = candidate[s[0].to_i]
        print cs[(s.size-1) % cs.size]
    }   
    puts
}