#!/usr/bin/env python cipher_bytes = list(map(int, (input().split(',')))) cipher_with_index = list(zip(range(0, len(cipher_bytes)), cipher_bytes)) def decrypt(key, cwi): def dec(tup): i, c = tup return c^key[i%3] return list(map(dec, cwi)) def toText(t): s = '' for c in t: s = s + chr(c) return s def asciisum(t): s = 0 for c in t: s = s + c return s def allprint(a): for c in a: if c >= 0x7f or c < 0x20: return False return True key = [ord('a')] * 3 for key[0] in range(ord('a'), ord('z')+1): for key[1] in range(ord('a'), ord('z')+1): for key[2] in range(ord('a'), ord('z')+1): decrypted = decrypt(key, cipher_with_index) if allprint(decrypted): print(toText(decrypted)) print(asciisum(decrypted))