#include<iostream>

using namespace std;
char Num_1[5]={'?',39,',','.','!'};
char Num_2[6]={'C','a','b','c','A','B'};
char Num_3[6]={'F','d','e','f','D','E'};
char Num_4[6]={'I','g','h','i','G','H'};
char Num_5[6]={'L','j','k','l','J','K'};
char Num_6[6]={'O','m','n','o','M','N'};
char Num_7[8]={'S','p','q','r','s','P','Q','R'};
char Num_8[6]={'V','t','u','v','T','U'};
char Num_9[8]={'Z','w','x','y','z','W','X','Y'};
void translate(char c,int n)
{
	int i;
	switch(c)
	{
	case '0':
		for(i=0;i<n-1;i++)cout<<" ";break;
	case '1':cout<<Num_1[n%5];break;
	case '2':cout<<Num_2[n%6];break;
	case '3':cout<<Num_3[n%6];break;
	case '4':cout<<Num_4[n%6];break;
	case '5':cout<<Num_5[n%6];break;
	case '6':cout<<Num_6[n%6];break;
	case '7':cout<<Num_7[n%8];break;
	case '8':cout<<Num_8[n%6];break;
	case '9':cout<<Num_9[n%8];break;
		
	}
}
void convert(char str[])
{
	int i=0;
	int cnt=0;
	while(str[i]!='\0')
	{
		if(str[i] != str[i+1])
		{
			cnt++;
			translate(str[i],cnt);
			cnt=0;
		}
		else cnt++;
		i++;
	}
}
int main()
{
	char str[10010];
	while(cin>>str)
	{
		convert(str);
		cout<<endl;
	}
	return 0;
}