#include
#include
void main() { char str[20];
char d[10][20]={"I","II","III","IV","V","VI","VII","VIII","IX","X"};
int i,k;
scanf("%s",str);
for ( i=0,k=0;i<10;i++ ) if ( strcmp(str,d[i])==0 ) {k=i+1;break;}
if ( k>0 ) printf("%s ==> %d\n",str,k);
scanf("%d",&k); printf("%d ==> %s\n",k,d[k-1]);
}