T = int(input()) for _ in range(T): K, M, N = map(int, input().split()) used = set() A = [] for a in range(1, K + 1): b = (a + M - 2) % K + 1 if a != b and a not in used and b not in used: used.add(a) used.add(b) A.append(a) if len(A) < N: print('No') else: print('Yes') print(*A[:N])