#include using namespace std; using ll=long long; int main(){ int ttt; cin>>ttt; while(ttt--){ ll n,k; cin>>n>>k; if(n==k||k==1){ cout<<"No"< a(n-1),b(n-1),c(n-2); iota(a.begin(),a.end(),2); iota(b.begin(),b.end(),n+1); iota(c.begin(),c.end(),2*n); k-=2; ranges::reverse(a.begin()+k,a.end()); ranges::reverse(b.begin()+k,b.end()); ranges::reverse(c.begin()+k+1,c.end()); cout<<1; for(int i=0;i