#include <cstdio>
#include <iostream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
int t,n;
int main()
{
char str[200];
while(~scanf("%s",str))
{
int len=strlen(str);
for(int i=0;i<len;i++)
{
if(str[i]>='A'&&str[i]<='Z')
{
if(str[i]!='Z')
str[i]+=33;
else
str[i]+=7;
cout<<str[i];
continue;
}
if(str[i]=='1')
cout<<"1";
else if(str[i]=='a'||str[i]=='b'||str[i]=='c')
cout<<"2";
else if(str[i]=='d'||str[i]=='e'||str[i]=='f')
cout<<"3";
else if(str[i]=='g'||str[i]=='h'||str[i]=='i')
cout<<"4";
else if(str[i]=='j'||str[i]=='k'||str[i]=='l')
cout<<"5";
else if(str[i]=='m'||str[i]=='n'||str[i]=='o')
cout<<"6";
else if(str[i]=='p'||str[i]=='q'||str[i]=='r'||str[i]=='s')
cout<<"7";
else if(str[i]=='t'||str[i]=='u'||str[i]=='v')
cout<<"8";
else if(str[i]=='w'||str[i]=='x'||str[i]=='y'||str[i]=='z')
cout<<"9";
else if(str[i]=='0')
cout<<"0";
else
cout<<str[i];
}
cout<<endl;
}
}