#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;

char a[10000];
int main()
{
    int num;
    int st,i;
    while(cin>>a)
    {
        st=strlen(a);

        for(i=1; i<=st; i++)
        {
            num=1;
            while(a[i]==a[i-1]&&i<st)
            {
                i++;
                num++;
            }

            switch(a[i-1]-48)
            {

            case 0:
                for(int j=1; j<num; j++)
                    cout<<" ";
                break;
            case 1:
                switch(num%5)
                {
                case 1:
                    cout<<"'";
                    break;
                case 2:
                    cout<<",";
                    break;
                case 3:
                    cout<<".";
                    break;
                case 4:
                    cout<<"!";
                    break;
                case 0:
                    cout<<"?";
                    break;
                }
                break;
            case 2:
            {
                switch(num%6)
                {
                case 1:
                    cout<<"a";
                    break;
                case 2:
                    cout<<"b";
                    break;
                case 3:
                    cout<<"c";
                    break;
                case 4:
                    cout<<"A";
                    break;
                case 5:
                    cout<<"B";
                    break;
                case 0:
                    cout<<"C";
                    break;
                }
            }
            break;
            case 3:
            {
                switch(num%6)
                {
                case 1:
                    cout<<"d";
                    break;
                case 2:
                    cout<<"e";
                    break;
                case 3:
                    cout<<"f";
                    break;
                case 4:
                    cout<<"D";
                    break;
                case 5:
                    cout<<"E";
                    break;
                case 0:
                    cout<<"F";
                        break;
                }
            }
            break;
            case 4:
            {
                switch(num%6)
                {
                case 1:
                    cout<<"g";
                    break;
                case 2:
                    cout<<"h";
                    break;
                case 3:
                    cout<<"i";
                    break;
                case 4:
                    cout<<"G";
                    break;
                case 5:
                    cout<<"H";
                    break;
                case 0:
                    cout<<"I";
                    break;
                }
            }
            break;
            case 5:
            {
                switch(num%6)
                {
                case 1:
                    cout<<"j";
                    break;
                case 2:
                    cout<<"k";
                    break;
                case 3:
                    cout<<"l";
                    break;
                case 4:
                    cout<<"J";
                    break;
                case 5:
                    cout<<"K";
                    break;
                case 0:
                    cout <<"L";
                    break;
                }
            }
            break;
            case 6:
            {
                switch(num%6)
                {
                case 1:
                    cout<<"m";
                    break;
                case 2:
                    cout<<"n";
                    break;
                case 3:
                    cout<<"o";
                    break;
                case 4:
                    cout<<"M";
                    break;
                case 5:
                    cout<<"N";
                    break;
                case 0:
                    cout<<"O";
                    break;
                }
            }
            break;
            case 8:
            {
                switch(num%6)
                {
                case 1:
                    cout<<"t";
                    break;
                case 2:
                    cout<<"u";
                    break;
                case 3:
                    cout<<"v";
                    break;
                case 4:
                    cout<<"T";
                    break;
                case 5:
                    cout<<"U";
                    break;
                case 0:
                    cout<<"V";
                    break;
                }
            }
            break;
            case 7:
            {
                switch(num%8)
                {
                case 1:
                    cout<<"p";
                    break;
                case 2:
                    cout<<"q";
                    break;
                case 3:
                    cout<<"r";
                    break;
                case 4:
                    cout<<"s";
                    break;
                     case 5:
                    cout<<"P";
                    break;
                case 6:
                    cout<<"Q";
                    break;
                case 7:
                    cout<<"R";
                    break;
                case 0:
                    cout<<"S";
                    break;
                }
            }
            break;
            case 9:
            {
                switch(num%8)
                {
                case 1:
                    cout<<"w";
                    break;
                case 2:
                    cout<<"x";
                    break;
                case 3:
                    cout<<"y";
                    break;
                case 4:
                    cout<<"z";
                    break;
                    case 5:
                    cout<<"W";
                    break;
                case 6:
                    cout<<"X";
                    break;
                case 7:
                    cout<<"Y";
                    break;
                case 0:
                    cout<<"Z";
                    break;
                }
            }
            break;
            }
        }
        cout<<endl;
    }
    return 0;
}

Measured memory_bytes: 0