import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String origin = sc.nextLine();
String encrypt = sc.nextLine();
StringBuilder decryptBuilder = new StringBuilder();
StringBuilder encryptBuilder = new StringBuilder();
for (char c : origin.toCharArray()) {
if (c == 'z') {
c = 'A';
} else if (c == 'Z') {
c = 'a';
} else if (c == '9') {
c = '0';
}else if (Character.isLowerCase(c)) {
c = (char) (c - 31);
} else if (Character.isUpperCase(c)) {
c = (char) (c + 33);
} else if (Character.isDigit(c)) {
c = (char) (c + 1);
}
decryptBuilder.append(c);
}
System.out.println(decryptBuilder);
for (char c : encrypt.toCharArray()) {
if (c == 'A') {
c = 'z';
}else if (c == 'a') {
c = 'Z';
}else if (c == '0') {
c = '9';
}else if (Character.isLowerCase(c)) {
c = (char) (c - 33);
}else if (Character.isUpperCase(c)) {
c = (char) (c + 31);
}else if (Character.isDigit(c)) {
c = (char) (c - 1);
}
encryptBuilder.append(c);
}
System.out.println(encryptBuilder);
}
sc.close();
}
}