#include<stdio.h>
#include<string.h>
int main()
{
char a[1000], b[1000];
gets(a);
gets(b);
for(int i=0; i<strlen(a); i++)
{
if(isalpha(a[i]))
{
if(a[i]>='A' && a[i]<'Z')
a[i] += 33;
else if(a[i] == 'Z')
a[i] = 'a';
else if(a[i]>='a' && a[i]<'z')
a[i] -= 31;
else if(a[i] == 'z')
a[i] = 'A';
}
else
{
if(a[i] == '9')
a[i] = '0';
else
a[i] += 1;
}
}
for(int i=0; i<strlen(b); i++)
{
if(isalpha(b[i]))
{
if(b[i]>'A' && b[i]<='Z')
b[i] += 31;
else if(b[i] == 'A')
b[i] = 'z';
else if(b[i]>'a' && b[i]<='z')
b[i] -= 33;
else if(b[i] == 'a')
b[i] = 'Z';
}
else
{
if(b[i] == '0')
b[i] = '9';
else
b[i] -= 1;
}
}
printf("%s\n", a);
printf("%s\n", b);
}