ary = require('fs').readFileSync('/dev/stdin', 'ascii').split("\n");
idx0 = ary.findIndex(function(elem, i, ary) { return elem == '0'; });
for (i = 0; i < idx0; i++) console.log("Case %d: %s", i+1, ary[i]);