#!/usr/bin/python

import sys
import math

def FractilesSmall(K, C, S):
    return True

if __name__ == "__main__":
    t = int(raw_input())
    for i in range(1, t + 1):
        K, C, S = [int(s) for s in raw_input().split(" ")]
        print("Case #" + str(i) + ": "),
        for j in range(1, S + 1):
            print(j),
        print 
