process.stdin.resume();
process.stdin.setEncoding('utf8');

process.stdin.on('data', (chunk) => {
    let lines = chunk.toString().split('\n');
    let count = 0;
    let str = '';
    for (var s of lines) {
        count ++;
        if (s !== '0') {
            console.log(`Case ${count}: ${s}`);
        } else {
            break;
        }
    }
});
