public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int[] a = new int[1];
		int[] b = new int[1];
		do {
			int x = sc.nextInt();
			if (x == 0) { break;}
			a[a.length - 1] = x;
			
			b = new int[a.length];
			for (int j = 0;j < a.length;j++){
				b[j] = a[j];
			}
			a = new int[a.length + 1];
			for (int j = 0;j < b.length;j++){
				a[j] = b[j];
			}
		} while (true);
		for (int i = 0;i < b.length;i++) {
			System.out.println("Case " + (i+1) + ": " + b[i]);
		}
	}
} public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int[] a = new int[1];
		int[] b = new int[1];
		do {
			int x = sc.nextInt();
			if (x == 0) { break;}
			a[a.length - 1] = x;
			
			b = new int[a.length];
			for (int j = 0;j < a.length;j++){
				b[j] = a[j];
			}
			a = new int[a.length + 1];
			for (int j = 0;j < b.length;j++){
				a[j] = b[j];
			}
		} while (true);
		for (int i = 0;i < b.length;i++) {
			System.out.println("Case " + (i+1) + ": " + b[i]);
		}
	}
} Main public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int[] a = new int[1];
		int[] b = new int[1];
		do {
			int x = sc.nextInt();
			if (x == 0) { break;}
			a[a.length - 1] = x;
			
			b = new int[a.length];
			for (int j = 0;j < a.length;j++){
				b[j] = a[j];
			}
			a = new int[a.length + 1];
			for (int j = 0;j < b.length;j++){
				a[j] = b[j];
			}
		} while (true);
		for (int i = 0;i < b.length;i++) {
			System.out.println("Case " + (i+1) + ": " + b[i]);
		}
	} main {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int[] a = new int[1];
		int[] b = new int[1];
		do {
			int x = sc.nextInt();
			if (x == 0) { break;}
			a[a.length - 1] = x;
			
			b = new int[a.length];
			for (int j = 0;j < a.length;j++){
				b[j] = a[j];
			}
			a = new int[a.length + 1];
			for (int j = 0;j < b.length;j++){
				a[j] = b[j];
			}
		} while (true);
		for (int i = 0;i < b.length;i++) {
			System.out.println("Case " + (i+1) + ": " + b[i]);
		}
	} java.util.Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) int[] a = new int[1]; a new int[1] 1 int[] b = new int[1]; b new int[1] 1 do {
			int x = sc.nextInt();
			if (x == 0) { break;}
			a[a.length - 1] = x;
			
			b = new int[a.length];
			for (int j = 0;j < a.length;j++){
				b[j] = a[j];
			}
			a = new int[a.length + 1];
			for (int j = 0;j < b.length;j++){
				a[j] = b[j];
			}
		} while (true); true {
			int x = sc.nextInt();
			if (x == 0) { break;}
			a[a.length - 1] = x;
			
			b = new int[a.length];
			for (int j = 0;j < a.length;j++){
				b[j] = a[j];
			}
			a = new int[a.length + 1];
			for (int j = 0;j < b.length;j++){
				a[j] = b[j];
			}
		} int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc if (x == 0) { break;} x == 0 x 0 { break;} break; a[a.length - 1] = x a[a.length - 1] a a.length - 1 a.length a a.length 1 x b = new int[a.length] b new int[a.length] a.length a a.length for (int j = 0;j < a.length;j++){
				b[j] = a[j];
			} int j = 0; int j = 0; j 0 j < a.length j a.length a a.length j++ j++ j {
				b[j] = a[j];
			} {
				b[j] = a[j];
			} b[j] = a[j] b[j] b j a[j] a j a = new int[a.length + 1] a new int[a.length + 1] a.length + 1 a.length a a.length 1 for (int j = 0;j < b.length;j++){
				a[j] = b[j];
			} int j = 0; int j = 0; j 0 j < b.length j b.length b b.length j++ j++ j {
				a[j] = b[j];
			} {
				a[j] = b[j];
			} a[j] = b[j] a[j] a j b[j] b j for (int i = 0;i < b.length;i++) {
			System.out.println("Case " + (i+1) + ": " + b[i]);
		} int i = 0; int i = 0; i 0 i < b.length i b.length b b.length i++ i++ i {
			System.out.println("Case " + (i+1) + ": " + b[i]);
		} {
			System.out.println("Case " + (i+1) + ": " + b[i]);
		} System.out.println("Case " + (i+1) + ": " + b[i]) System.out.println System.out System System.out "Case " + (i+1) + ": " + b[i] ": " "Case " + (i+1) + ": " + b[i] "Case " (i+1) i 1 ": " b[i] b i String[] args args public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int[] a = new int[1];
		int[] b = new int[1];
		do {
			int x = sc.nextInt();
			if (x == 0) { break;}
			a[a.length - 1] = x;
			
			b = new int[a.length];
			for (int j = 0;j < a.length;j++){
				b[j] = a[j];
			}
			a = new int[a.length + 1];
			for (int j = 0;j < b.length;j++){
				a[j] = b[j];
			}
		} while (true);
		for (int i = 0;i < b.length;i++) {
			System.out.println("Case " + (i+1) + ": " + b[i]);
		}
	}
} public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int[] a = new int[1];
		int[] b = new int[1];
		do {
			int x = sc.nextInt();
			if (x == 0) { break;}
			a[a.length - 1] = x;
			
			b = new int[a.length];
			for (int j = 0;j < a.length;j++){
				b[j] = a[j];
			}
			a = new int[a.length + 1];
			for (int j = 0;j < b.length;j++){
				a[j] = b[j];
			}
		} while (true);
		for (int i = 0;i < b.length;i++) {
			System.out.println("Case " + (i+1) + ": " + b[i]);
		}
	}
} Main
public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int[] a = new int[1];
		int[] b = new int[1];
		do {
			int x = sc.nextInt();
			if (x == 0) { break;}
			a[a.length - 1] = x;
			
			b = new int[a.length];
			for (int j = 0;j < a.length;j++){
				b[j] = a[j];
			}
			a = new int[a.length + 1];
			for (int j = 0;j < b.length;j++){
				a[j] = b[j];
			}
		} while (true);
		for (int i = 0;i < b.length;i++) {
			System.out.println("Case " + (i+1) + ": " + b[i]);
		}
	}
}