// Arup Guha
// 3/7/2015
// Solution to 2016 UCF HS Problem: Baby Names

import java.util.*;

public class names {

	final public static String VOWELS = "AEIOU";

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int numCases = stdin.nextInt();

		// Process each case.
		for (int loop=1; loop<=numCases; loop++) {

			// Store all names here.
			TreeSet<String> set = new TreeSet<String>();

			// Get parents.
			String dad = stdin.next();
			String mom = stdin.next();

			// Go through each possible pairings of names, with dad coming first.
			for (int i=1; i<dad.length(); i++) {
				for (int j=1; j<mom.length(); j++) {

					// Skip over combinations with two vowels or consonants at the joining location.
					if (VOWELS.contains(""+dad.charAt(i-1)) && VOWELS.contains(""+mom.charAt(j))) continue;
					if (!VOWELS.contains(""+dad.charAt(i-1)) && !VOWELS.contains(""+mom.charAt(j))) continue;

					// Add the combined name.
					set.add(dad.substring(0, i) + mom.substring(j));
				}
			}

			// Now, mom comes first.
			for (int i=1; i<mom.length(); i++) {
				for (int j=1; j<dad.length(); j++) {

					// Skip over combinations with two vowels or consonants at the joining location.
					if (VOWELS.contains(""+mom.charAt(i-1)) && VOWELS.contains(""+dad.charAt(j))) continue;
					if (!VOWELS.contains(""+mom.charAt(i-1)) && !VOWELS.contains(""+dad.charAt(j))) continue;

					// Add the combined name.
					set.add(mom.substring(0, i) + dad.substring(j));
				}
			}

			// Print header and delete items in alpha order and print.
			System.out.println("Couple #"+loop+": "+set.size()+" possible names");
			while (set.size() > 0)
				System.out.println(set.pollFirst());

			// Blank line at end of case.
			System.out.println();
		}
	}
}