process.stdin.setEncoding('ascii');
rl = require('readline').createInterface(process.stdin);
rl.resume();

i = 1;
end = false;
rl.on('line', function (line) {
	if (end) return;
	if (line == '0') {
		rl.close();
		end = true;
		return;
	}
	console.log("Case %d: %s", i, line);
	i++;
});