import java.util.Scanner; public class DRMMessagesDavid { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String encrypted = scan.next(); scan.close(); System.out.println(Decrypt(encrypted)); } private static String Decrypt(String encrypted) { String p1 = encrypted.substring(0, encrypted.length() / 2); String p2 = encrypted.substring(encrypted.length() / 2); return Merge(Rotate(p1), Rotate(p2)); } private static String Merge(String s1, String s2) { char[] result = new char[s1.length()]; for (int i = 0; i < s1.length(); i++) { result[i] = (char)((s1.charAt(i) - 'A' + s2.charAt(i) - 'A') % 26 + 'A'); } return new String(result); } private static String Rotate(String s) { char[] c = new char[s.length()]; int rotation = GetRotationOfString(s); for (int i = 0; i < s.length(); i++) { c[i] = Rotate(s.charAt(i), rotation); } return new String(c); } private static char Rotate(char c, int rotation) { return (char)('A' + ((c - 'A' + rotation) % 26)); } private static int GetRotationOfString(String s) { int rotation = 0; for (int i = 0; i < s.length(); i++) { rotation += s.charAt(i) - 'A'; } return rotation; } }