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()) #C=list(map(int, input().split())) ans=[] D={} q=M-1 for p in range(1,K+1): q+=1 if q>K: q=1 if p not in D and q not in D and p!=q: D[p]=1;D[q]=1;ans.append(p) if len(ans)