'use strict';

var rl = require('readline').createInterface({
    input: require('fs').createReadStream('/dev/stdin')
});

var printTest = function(rl) {
    var i = 1;
    rl.on('line', function(line) {
        var n = parseInt(line);
        // console.log('Line from file:', line);
        if (n === 0) {
            return;
        }
        console.log("Case " + i + ": " + n);
        i++;
    });
}

printTest(rl);