solved 1107: W's Cipher (accepted but too naive code)