import scala.io.StdIn.{readInt,readLine}

object Main {
  val a = Array(
    Array('.',',','!','?',' '),
    Array('a','b','c'),
    Array('d','e','f'),
    Array('g','h','i'),
    Array('j','k','l'),
    Array('m','n','o'),
    Array('p','q','r','s'),
    Array('t','u','v'),
    Array('w','x','y','z')
  )

  def main(args:Array[String]) = {
    val n = readInt
    val r = for(i<-1 to n) yield {
      val s = readLine.split("0")
      s.map { btns =>
        if(btns.length>0) {
          val btn = btns(0).asDigit
          val len = if(List(2,3,4,5,6,8).contains(btn)) 3
                    else if(List(7,9).contains(btn)) 4
                    else if(List(1).contains(btn)) 5
                    else 1
          a(btn-1)((btns.length-1) % len)
        } else ""
      }.mkString
    }
    println(r.mkString("\n"))
  }

}