T = int(raw_input().strip())
for t in range(1,T+1):
  print "Case #" + str(t) + ":",
  K,C,S = raw_input().strip().split()
  K = int(K)
  C = int(C)
  S = int(S)
  for i in range(1,K+1):
    print i,
  print ""
