object Main extends App {
  import scala.io.StdIn._
  val button = Array(" ", "',.!?", "abcABC", "defDEF", "ghiGHI", "jklJKL", "mnoMNO", "pqrsPQRS", "tuvTUV", "wxyzWXYZ")
  var line = readLine
  while(line != null){
    println(line.trim.map(_.asDigit).foldLeft(State()){case (s, b) ⇒ s.push(b)})
    line = readLine
  }
  case class State(input: List[Char] = Nil, prev: Option[(Int, Int)] = None) {
    def push(b: Int): State = {
      b match {
        case 0 ⇒
          prev match {
            case Some((0, _)) ⇒ State(' '::input, prev)
            case Some((c, i)) ⇒ State(button(c)(i % button(c).length)::input, Some((0, 0)))
            case _ ⇒ ???
          }
        case _ ⇒
          prev match {
            case Some((0, _)) ⇒ State(input, Some(b, 0))
            case Some((c, i)) if b == c⇒ State(input, Some(c, i + 1))
            case Some((c, i)) ⇒ State(button(c)(i % button(c).length)::input, Some(b, 0))
            case None ⇒ State(input, Some(b, 0))
          }
      }
    }

    override def toString: String = prev match {
      case Some((c, i)) ⇒ (button(c)(i % button(c).length)::input).reverse.mkString("")
      case None ⇒ input.reverse.mkString("")
    }
  }
}
