// Arup Guha
// 10/9/2015
// Solution to 2001 UCF HS Contest Problem: Nihongo no AI (Japanese Language AI)

import java.util.*;

public class nihongo {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		String line = stdin.nextLine();

		// Process each case.
		while (!line.equals("yame")) {

			// Read in each separate token.
			StringTokenizer tok = new StringTokenizer(line);
			String[] all = new String[tok.countTokens()];
			int n = all.length;
			for (int i=0; i<n; i++)
				all[i] = tok.nextToken();

			// Affirmative.
			System.out.print("Hai, ");

			// Special case.
			if (all[n-2].equals("desu"))
				System.out.print(all[n-3]+" ");

			// Always ends with this.
			System.out.println(all[n-2]);

			// Get next case.
			line = stdin.nextLine();
		}
	}
}