### constant

KEYS = [
  "", #0
  "\',.!?", #1
  "abcABC", #2
  "defDEF", #3
  "ghiGHI", #4
  "jklJKL", #5
  "mnoMNO", #6
  "pqrsPQRS", #7
  "tuvTUV", #8
  "wxyzWXYZ", #9
]

### main

while line = gets
  pushes = []
  pch = nil
  pnum = 0

  for ch in line.strip.split('')
    if pch != ch
      pushes << [pch.to_i, pnum] if pnum > 0
      pch = ch
      pnum = 1
    else
      pnum += 1
    end
  end
  pushes << [pch.to_i, pnum] if pnum > 0
  #p pushes

  str = ''

  for push in pushes
    k, num = push

    if k == 0
      str += ' ' * (num - 1)
    else
      keys = KEYS[k]
      str += keys[(num - 1) % keys.length]
    end
  end

  puts str
end