###AUTHOR:PUNIT PATEL###
test_case=int(raw_input())
for i in range(1,test_case+1):
     KK,CC,SS=map(int,(raw_input().split()))
     print "Case #"+str(i)+":",
     for jj in range(1,KK+1):
         print jj,
     print ""
