static int process(String line) {
		int cnt = Integer.parseInt(line.trim());
		if(cnt == 0)
			return 0;
		String[] inp = new String[cnt];
		for(int i = 0; i < cnt; i++) {
			inp[i] = readLine().trim();
		}
		int[] prev = new int[cnt];
		System.out.println(String.format("Case %d:", casen));
		
		for(int i = 0; i < cnt;) {
			//System.out.println("start : "+i);
			int n = i + 1;
			while(n < cnt) {
				if(inp[n].length() == inp[i].length()) {
					long a = Long.parseLong(inp[i]), b = Long.parseLong(inp[n]);
					if((b - a) == (n - i)) {
						n++;
					}
					else {
						break;
					}
				}
				else {
					break;
				}
			}
			prev[i] = n - 1 - i;
			
			if(prev[i] == 0) {
				System.out.println(inp[i].trim());
			}
			else {
				long a = Long.parseLong(inp[i]);
				long b = a + prev[i];
				long comm = 1;
				while((a/comm) != (b/comm)) {
					comm*=10;
				}
				System.out.println(inp[i].trim()+"-"+(b % comm));
			}
			
			i = n;
			//System.out.println(i+" : "+cnt);
		}
		System.out.println();
		casen++;
		return 1;
	}