// Arup Guha
// 10/14/2015
// Solution to 2000 UCF HS Contest Problem: Secret Judging League

import java.util.*;

public class league {

	// Really annoying to type these in...not a problem we'd give today.

	final public static String[] FIRST = {"Stinky", "Lumpy", "Buttercup", "Gidget", "Crusty",
		"Greasy", "Fluffy", "Cheeseball", "Chim-Chim", "Poopsie", "Flunky", "Booger", "Pinky",
		"Zippy", "Goober", "Doofus", "Slimy", "Loopy", "Snotty", "Falafel", "Dorkey", "Squeezit",
		"Oprah", "Skipper", "Dinky", "Zsa-Zsa"};

	final public static String[] LAST = {"Diaper", "Toilet", "Giggle", "Bubble", "Girdle",
		"Barf", "Lizard", "Waffle", "Cootie", "Monkey", "Potty", "Liver", "Banana", "Rhino",
		"Burger", "Hamster", "Toad", "Gizzard", "Pizza", "Gerbil", "Chicken", "Pickle",
		"Chuckle", "Tofu", "Gorilla", "Stinker"};

	final public static String[] ADD = {"head", "mouth", "face", "nose", "tush", "breath",
		"pants", "shorts", "lips", "honker", "butt", "brain", "tushie", "chunks", "hiney",
		"biscuits", "toes", "buns", "fanny", "sniffer", "sprinkles", "kisser", "squirt",
		"humperdinck", "brains", "juice"};

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int numCases = Integer.parseInt(stdin.nextLine());

		// Process each case.
		for (int loop=1; loop<=numCases; loop++) {

			// Read line.
			StringTokenizer tok = new StringTokenizer(stdin.nextLine());

			// Parse out relevant lines.
			String first = tok.nextToken().toLowerCase();
			String last = tok.nextToken().toLowerCase();
			while (tok.hasMoreTokens())
				last = tok.nextToken().toLowerCase();

			// Output result.
			System.out.println(FIRST[first.charAt(0)-'a']+" "+LAST[last.charAt(0)-'a']+ADD[last.charAt(last.length()-1)-'a']);
		}
	}
}