import java.util.*;

public class roshambo {
	int trans(String value, String country) {
		if(country.startsWith("cs")) {
			if(value.startsWith("Kamen")) {
				return 1; 
			}

			if(value.startsWith("Nuzky")) {
				return 2; 
			}

			if(value.startsWith("Papir")) {
				return 3; 
			}
		}

		if(country.startsWith("en")) {
			if(value.startsWith("Rock")) {
				return 1; 
			}

			if(value.startsWith("Scissors")) {
				return 2; 
			}

			if(value.startsWith("Paper")) {
				return 3; 
			}
		}

		if(country.startsWith("fr")) {
			if(value.startsWith("Pierre")) {
				return 1; 
			}

			if(value.startsWith("Ciseaux")) {
				return 2; 
			}

			if(value.startsWith("Feuille")) {
				return 3; 
			}
		}

		if(country.startsWith("de")) {
			if(value.startsWith("Stein")) {
				return 1; 
			}

			if(value.startsWith("Schere")) {
				return 2; 
			}

			if(value.startsWith("Papier")) {
				return 3; 
			}
		}

		if(country.startsWith("hu")) {
			if(value.startsWith("Ko") || value.startsWith("Koe")) {
				return 1; 
			}

			if(value.startsWith("Ollo")) {
				return 2; 
			}

			if(value.startsWith("Papir")) {
				return 3; 
			}
		}

		if(country.startsWith("it")) {
			if(value.startsWith("Sasso") || value.startsWith("Roccia")) {
				return 1; 
			}

			if(value.startsWith("Forbice")) {
				return 2; 
			}

			if(value.startsWith("Carta") || value.startsWith("Rete")) {
				return 3; 
			}
		}

		if(country.startsWith("jp")) {
			if(value.startsWith("Guu")) {
				return 1; 
			}

			if(value.startsWith("Choki")) {
				return 2; 
			}

			if(value.startsWith("Paa")) {
				return 3; 
			}
		}

		if(country.startsWith("pl")) {
			if(value.startsWith("Kamien")) {
				return 1; 
			}

			if(value.startsWith("Nozyce")) {
				return 2; 
			}

			if(value.startsWith("Papier")) {
				return 3; 
			}
		}

		if(country.startsWith("es")) {
			if(value.startsWith("Piedra")) {
				return 1; 
			}

			if(value.startsWith("Tijera")) {
				return 2; 
			}

			if(value.startsWith("Papel")) {
				return 3; 
			}
		}

		return 0;
	}

	void run() {
		String data;
		boolean exit = false;
		int game = 0;
		Scanner sc = new Scanner(System.in);
		while(!exit) {
			game++;
			data = sc.nextLine();
			String p1c = data.substring(0, data.indexOf(' '));
			String p1n = data.substring(data.indexOf(' ') + 1, data.length());

			int p1w = 0;
			int p2w = 0;

			data = sc.nextLine();
			String p2c = data.substring(0, data.indexOf(' '));
			String p2n = data.substring(data.indexOf(' ') + 1, data.length());

			while(true) {
				data = sc.nextLine();
				if (data.startsWith("-")) {
					break;
				}

				if (data.startsWith(".")) {
					exit = true;
					break;
				}

				String p1v = data.substring(0, data.indexOf(' '));
				String p2v = data.substring(data.indexOf(' ') + 1, data.length());

				// System.out.println(":" +trans(p1v, p1c) +":" +trans(p2v, p2c) +":");
				
				if(trans(p1v, p1c) == trans(p2v, p2c)) {
					continue;
				}

				if(trans(p1v, p1c) == 1 && trans(p2v, p2c) == 2) {
					p1w++;
					continue;
				} 

				if(trans(p1v, p1c) == 1 && trans(p2v, p2c) == 3) {
					p2w++;
					continue;
				} 

				if(trans(p1v, p1c) == 2 && trans(p2v, p2c) == 1) {
					p2w++;
					continue;
				} 

				if(trans(p1v, p1c) == 2 && trans(p2v, p2c) == 3) {
					p1w++;
					continue;
				} 

				if(trans(p1v, p1c) == 3 && trans(p2v, p2c) == 1) {
					p1w++;
					continue;
				} 

				if(trans(p1v, p1c) == 1 && trans(p2v, p2c) == 2) {
					p2w++;
					continue;
				}

				if(trans(p1v, p1c) == 3 && trans(p2v, p2c) == 2) {
					p2w++;
					continue;
				}  
			}

			System.out.println("Game #" +game +":");
			System.out.println(p1n +": " +p1w +((p1w == 1)?" point":" points"));
			System.out.println(p2n +": " +p2w +((p2w == 1)?" point":" points"));
			if(p1w == p2w) {
				System.out.println("TIED GAME");
				System.out.println();
			} else {
				if(p1w > p2w) {
					System.out.println("WINNER: " +p1n);
				} else {
					System.out.println("WINNER: " +p2n);
				}

				System.out.println();
			}
		}
	}

	public static void main(String[] args) {
		new roshambo().run();
	}
}