import heapq from heapq import heappop,heappush,heapify from sys import stdin, setrecursionlimit input = stdin.readline readline = stdin.readline T=int(input()) from collections import deque d=deque() for _ in range(T): K,M,N=map(int, input().split()) V=[0]*K;ans=[] for i in range(N): nex=(i+M-1)%K if V[i]==0 and V[nex]==0 and i!=nex: ans.append((i+1)) p,q=i,nex V[p]=1;V[q]=1 while True: p=(q+M-1)%K q=(p+M-1)%K if V[p]==0 and V[q]==0: V[p]=1;V[q]=1 ans.append((p+1)) else: break if len(ans)>=N: print('Yes') print(*ans[:N]) else: print('No') #C=list(map(int, input().split()))