#include using namespace std; using ll=long long; using ull=unsigned long long; using pll=pair; using tll=tuple; using ld=long double; const ll INF=(1ll<<60); #define rep(i,n) for (ll i=0;i<(ll)(n);i++) #define replr(i,l,r) for (ll i=(ll)(l);i<(ll)(r);i++) #define all(v) v.begin(),v.end() #define len(v) ((ll)v.size()) template inline bool chmin(T &a,T b){ if(a>b){ a=b; return true; } return false; } template inline bool chmax(T &a,T b){ if(a b; ll t; cin >> t; mt19937 mt; while(t--){ b.reset(); ll k,m,n; cin >> k >> m >> n; m--; vector ans; rep(i,k){ ll x=i,y=(i+m)%k; while(b[x]==0&&b[y]==0&&x!=y){ ans.push_back(x); b[x]=1; b[y]=1; x=(y+m)%k; y=(x+m)%k; } } if(n<=len(ans)){ cout << "Yes\n"; rep(i,n) cout << ans[i]+1 << ' '; cout << '\n'; }else{ cout << "No\n"; } } }