#include<iostream>
#include<string>
using namespace std;
int main( )
{
    string s,s1;
    char a,b,c;
    int count,size;
    int i,j,l,k;
    while(getline(cin,s))
    {
        s1="";
        i=0;
        size=s.size();
        while(1)
        {
            a=s[i];
            count=1;
            for(j=i;; ++j)
            {
                if(s[j+1]!=a)
                    break;
                ++count;
            }
            if(s[i+count]=='0')
                b=a;
            if(a=='0')
            {
                c=s[i+count];
            }
            if(a=='1')
            {
                k=count%5;
                switch(k)
                {
                case 1:
                    s1+="'";
                    break;
                case 2:
                    s1+=",";
                    break;
                case 3:
                    s1+=".";
                    break;
                case 4:
                    s1+="!";
                    break;
                case 0:
                    s1+="?";
                    break;
                }
            }
            else if(a=='2')
            {
                k=count%6;
                switch(k)
                {
                case 1:
                    s1+="a";
                    break;
                case 2:
                    s1+="b";
                    break;
                case 3:
                    s1+="c";
                    break;
                case 4:
                    s1+="A";
                    break;
                case 5:
                    s1+="B";
                    break;
                case 0:
                    s1+="C";
                }
            }
            else if(a=='3')
            {
                k=count%6;
                switch(k)
                {
                case 1:
                    s1+="d";
                    break;
                case 2:
                    s1+="e";
                    break;
                case 3:
                    s1+="f";
                    break;
                case 4:
                    s1+="D";
                    break;
                case 5:
                    s1+="E";
                    break;
                case 0:
                    s1+="F";
                    break;
                }
            }
            else if(a=='4')
            {
                k=count%6;
                switch(k)
                {
                case 1:
                    s1+="g";
                    break;
                case 2:
                    s1+="h";
                    break;
                case 3:
                    s1+="i";
                    break;
                case 4:
                    s1+="G";
                    break;
                case 5:
                    s1+="H";
                    break;
                case 0:
                    s1+="I";
                    break;

                }
            }
            else if(a=='5')
            {
                k=count%6;
                switch(k)
                {
                case 1:
                    s1+="j";
                    break;
                case 2:
                    s1+="k";
                    break;
                case 3:
                    s1+="l";
                    break;
                case 4:
                    s1+="J";
                    break;
                case 5:
                    s1+="K";
                    break;
                case 0:
                    s1+="L";
                    break;
                }
            }
            else if(a=='6')
            {
                k=count%6;
                switch(k)
                {
                case 1:
                    s1+="m";
                    break;
                case 2:
                    s1+="n";
                    break;
                case 3:
                    s1+="o";
                    break;
                case 4:
                    s1+="M";
                    break;
                case 5:
                    s1+="N";
                    break;
                case 0:
                    s1+="O";
                    break;
                }
            }
            else if(a=='7')
            {
                k=count%8;
                switch(k)
                {
                case 1:
                    s1+="p";
                    break;
                case 2:
                    s1+="q";
                    break;
                case 3:
                    s1+="r";
                    break;
                case 4:
                    s1+="s";
                    break;
                case 5:
                    s1+="P";
                    break;
                case 6:
                    s1+="Q";
                    break;
                case 7:
                    s1+="R";
                    break;
                case 0:
                    s1+="S";
                    break;
                }
            }
            else if(a=='8')
            {
                k=count%6;
                switch(k)
                {
                case 1:
                    s1+="t";
                    break;
                case 2:
                    s1+="u";
                    break;
                case 3:
                    s1+="v";
                    break;
                case 4:
                    s1+="T";
                    break;
                case 5:
                    s1+="U";
                    break;
                case 0:
                    s1+="V";
                    break;
                }
            }
            else if(a=='9')
            {
                k=count%8;
                switch(k)
                {
                case 1:
                    s1+="w";
                    break;
                case 2:
                    s1+="x";
                    break;
                case 3:
                    s1+="y";
                    break;
                case 4:
                    s1+="z";
                    break;
                case 5:
                    s1+="W";
                    break;
                case 6:
                    s1+="X";
                    break;
                case 7:
                    s1+="Y";
                    break;
                case 0:
                    s1+="Z";
                    break;
                }
            }
            else
            {
                if(b==c)
                {
                    if(count!=1)
                        for(l=1; l<count; ++l)
                            s1+=" ";
                }
                else
                    for(l=1; l<count; ++l)
                        s1+=" ";
            }
            i=i+count;
            if(i==size)
                break;
        }
        cout<<s1<<endl;
    }
    return 0;
}

Measured memory_bytes: 0