// Arup Guha
// 12/21/2015
// Solution to UCF 1987 HS Contest Problem: Pig Latin

import java.util.*;

public class piglatin {

	final public static String VOWELS = "aeiouAEIOU";

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);

		// Go through the whole file.
		while (stdin.hasNext()) {

			// Tokenize this line.
			StringTokenizer tok = new StringTokenizer(stdin.nextLine());

			// Put a space after everything but the last token.
			while (tok.countTokens() > 1) {
				System.out.print(convert(tok.nextToken()));
				System.out.print(" ");
			}
			System.out.println(convert(tok.nextToken()));
		}
	}

	public static String convert(String in) {

		// Beginning stuff.
		int n = in.length();
		String tmp = in.toLowerCase();
		char first = in.charAt(0);
		boolean hasPeriod = false;
		boolean upper = false;

		// Check for period.
		if (in.charAt(n-1) == '.') {
			tmp = in.substring(0,n-1);
			hasPeriod = true;
		}

		// Check if first is upper case.
		if ('A' <= first && first <= 'Z') upper = true;

		// Set ending.
		String end = "ay";
		if (VOWELS.contains(""+tmp.charAt(0))) end = "hay";

		// Find first vowel.
		int i = 0;
		while (!VOWELS.contains(""+tmp.charAt(i))) i++;

		// Build result, checking for period and uppercase.
		String res = tmp.substring(i) + tmp.substring(0, i) + end;
		if (hasPeriod) res = res + ".";
		if (upper) res = ("" + ((char)(res.charAt(0)-'a'+'A'))) + res.substring(1);

		// Finally...
		return res;
	}
}