// Arup Guha
// 9/17/2019
// Alternate Solution to Fall 2019 CIS 3362 Homework #2 Question #4

import java.util.*;
import java.io.*;

public class h2q4 {

	public static void main(String[] args) throws Exception {
	
		// Will redirect ciphertext to standard input.
		Scanner stdin = new Scanner(System.in);
		
		String cipher = stdin.next();
		
		// We'll read in all the possible keys from here.
		Scanner words = new Scanner(new File("words.txt"));
		
		// Try each word.
		while (words.hasNext()) {
		
			String key = words.next();
			String plain = decrypt(cipher, key);
			
			// Output a possible decryption.
			if (plain.contains("fast")) {
				System.out.println("A possible decryption is:");
				System.out.println(plain);
			}
		}
	}
	
	// Returns the decryption of ciphertext cipher with key using the Vigenere cipher.
	public static String decrypt(String cipher, String key) {
		char[] res = new char[cipher.length()];
		
		// Just sub out each appropriate letter...see how mod is your friend =)
		for (int i=0; i<res.length; i++)
			res[i] = (char)((cipher.charAt(i) - key.charAt(i%key.length()) + 26)%26 + 'a');
		return new String(res);
	
	}
}