#include<bits/stdc++.h>
using namespace std;
enum tnum{
a=1,b=2,c=3,d=4,e=5,f=6,g=7,h=8,i=9,j=0
};
struct s_int{
queue<tnum> q;
void int_in(){
char cc;
while(q.size())q.pop();
while(cc!=' ')
{
cc=getchar();
if(cc==' ')break;
tnum t;
switch(cc){
case '0':t=j;break;
case '1':t=a;break;
case '2':t=b;break;
case '3':t=c;break;
case '4':t=d;break;
case '5':t=e;break;
case '6':t=f;break;
case '7':t=g;break;
case '8':t=h;break;
case '9':t=i;break;
}
q.push(t);
}
}
void int_out(){
while(q.size()){
cout<<q.front();
q.pop();
}
}
};
int main(){
s_int a;
a.int_in();
a.int_out();
return 0;
}