#!/usr/bin/env python
# coding=utf-8


def main2():
    K, C, S = map(int, raw_input().split())
    for i in xrange(1, S + 1):
        print i,
    print ""

for i in xrange(input()):
    print "Case #" + str(i + 1) + ":",
    main2()

