import java.util.*

fun main(args:Array<String>):Unit{
    repeat(readLine()!!.toInt()){
        val cellar = Cellar()
        readLine()!!.forEach {
            cellar.push(it.toString().toInt())
        }
        println(cellar.displayed())
    }
}
class Cellar{
    private val mButton:Array<Button> = arrayOf(Button.One, Button.Two, Button.Three, Button.Four, Button.Five, Button.Six, Button.Seven, Button.Eight, Button.Nine)
    private var mCurrent:Int = 0
    private val mDisplay: Stack<Char> = Stack()
    fun push(number:Int):Unit {
        if (number == 0){
            confirm()
        }else{
            mCurrent = number
            mButton[mCurrent - 1].push()
        }
    }
    private fun confirm():Unit {
        if (mCurrent != 0){
            mDisplay.push(mButton[mCurrent - 1].confirm())
            mCurrent = 0
        }
    }
    fun displayed():String = mDisplay.joinToString("")
}
sealed class Button(private val mChars:String){
    private var mIndex:Int = 0
    fun push():Unit {
        ++mIndex
    }
    fun confirm():Char {
        val res = mChars[(mIndex - 1)% mChars.length]
        mIndex = 0
        return res
    }
    object One:Button(".,!? ")
    object Two:Button("abc")
    object Three:Button("def")
    object Four:Button("ghi")
    object Five:Button("jkl")
    object Six:Button("mno")
    object Seven:Button("pqrs")
    object Eight:Button("tuv")
    object Nine:Button("wxyz")
}
