// Arup Guha
// 3/7/2015
// Solution to 2016 UCF HS Problem: Welcome to Moes

import java.util.*;

public class moes {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int numPeople = stdin.nextInt();

		// Store each unique item here...
		HashSet<String> set = new HashSet<String>();

		// Process each case.
		for (int loop=1; loop<=numPeople; loop++) {

			// Get next person.
			String next = stdin.next();

			// Output for this case.
			if (!set.contains(next))
				System.out.println("Customer #"+loop+": Welcome to Moe's!!!");
			else
				System.out.println("Customer #"+loop+": **continue working**");

			// Add this person.
			set.add(next);
		}
	}
}