#!/usr/bin/ruby                                                                                                                                   
# -*- coding: utf-8 -*-                                                                                                                           

keys = [" ",
        "\',.!?",
        "abcABC",
        "defDEF",
        "ghiGHI",
        "jklJKL",
        "mnoMNO",
        "pqrsPQRS",
        "tuvTUV",
        "wxyzWXYZ"]

i = 0
while s = gets.chomp
  while true
    ch = s[i]
    count = 1
    if i + 1 >= s.length
      print keys[ch.to_i][count - 1]
      break
    end
    while ch == s[i += 1]
      count += 1
      if keys[ch.to_i].length == count
        break
      elsif ch.to_i == 0
        print ' '
      end
    end
    if ch.to_i != 0
      print keys[ch.to_i][count - 1]
    end
    if i >= s.length
      break
    elsif ch != s[i]
      next
    end
    i += 1
  end
  puts ""
  i = 0
end