x = gets.to_i
l = 0
i = []
while x != 0
  # i[l - 1] : x[l - 1]
  i[l] = l + 1

  puts "Case" + " " + i[l].to_s + ":" + " " + x.to_s

  unless (i.length <= 10000) || (1 <= x || x <= 10000  )
    return
  end

  l += 1
  x = gets.to_i
end

