import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		ArrayList<String> list = new ArrayList<String>();

		for (int i = 0; i < 10001; i++) {
			list.add(br.readLine());
			if ("0".equals(list.get(i))) {
				for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				}
				break;
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		ArrayList<String> list = new ArrayList<String>();

		for (int i = 0; i < 10001; i++) {
			list.add(br.readLine());
			if ("0".equals(list.get(i))) {
				for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				}
				break;
			}
		}
	}
} Main public static void main(String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		ArrayList<String> list = new ArrayList<String>();

		for (int i = 0; i < 10001; i++) {
			list.add(br.readLine());
			if ("0".equals(list.get(i))) {
				for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				}
				break;
			}
		}
	} main {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		ArrayList<String> list = new ArrayList<String>();

		for (int i = 0; i < 10001; i++) {
			list.add(br.readLine());
			if ("0".equals(list.get(i))) {
				for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				}
				break;
			}
		}
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() for (int i = 0; i < 10001; i++) {
			list.add(br.readLine());
			if ("0".equals(list.get(i))) {
				for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				}
				break;
			}
		} int i = 0; int i = 0; i 0 i < 10001 i 10001 i++ i++ i {
			list.add(br.readLine());
			if ("0".equals(list.get(i))) {
				for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				}
				break;
			}
		} {
			list.add(br.readLine());
			if ("0".equals(list.get(i))) {
				for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				}
				break;
			}
		} list.add(br.readLine()) list.add list br.readLine() br.readLine br if ("0".equals(list.get(i))) {
				for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				}
				break;
			} "0".equals(list.get(i)) "0".equals "0" list.get(i) list.get list i {
				for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				}
				break;
			} for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				} int j = 1; int j = 1; j 1 j < list.size() j list.size() list.size list j++ j++ j {
					System.out.println("Case "+j+": "+list.get(j-1));
				} {
					System.out.println("Case "+j+": "+list.get(j-1));
				} System.out.println("Case "+j+": "+list.get(j-1)) System.out.println System.out System System.out "Case "+j+": "+list.get(j-1) ": " "Case "+j+": "+list.get(j-1) "Case " j ": " list.get(j-1) list.get list j-1 j 1 break; String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		ArrayList<String> list = new ArrayList<String>();

		for (int i = 0; i < 10001; i++) {
			list.add(br.readLine());
			if ("0".equals(list.get(i))) {
				for (int j = 1; j < list.size(); j++) {
					System.out.println("Case "+j+": "+list.get(j-1));
				}
				break;
			}
		}
	}
}