/* written by Pankaj Kumar. country:-INDIA */ #include #include #include using namespace std; using namespace __gnu_pbds; typedef long long ll ; typedef vector vl; typedef vector> vvl; #define speed cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0); /* Abbrevations */ #define ff first #define ss second #define mp make_pair #define line cout<()) // some extra #define printv(v) for(ll i=0;i,rb_tree_tag,tree_order_statistics_node_update> class Codeforces{ private: // read only variable const ll INF=1e18; const ll mod1=1e9+7; const ll mod2=998244353; public: Codeforces(){ } ll power(ll x,ll y){ ll result=1; while(y>0){ if(y&1){ result*=x; } y>>=1; x*=x; } return result; } ll power(ll x,ll y,ll mod){ ll result=1; x%=mod; while(y>0){ if(y&1){ result*=x; result%=mod; } y>>=1; x*=x; x%=mod; } return result; } ll str_to_num(string s){ stringstream pk(s); ll num; pk>>num; return num; } string num_to_str(ll num){ return to_string(num); } // Techniques : // divide into cases, brute force, pattern finding // sort, greedy, binary search, two pointer // transform into graph // Experience : // Cp is nothing but only observation and mathematics. ll solve(){ ll n,x; cin>>n>>x; vector ans; if(n&1){ ans.pb(x); for(ll i=1;i<=n/2;i++){ ans.pb(x-i); ans.pb(x+i); } } else{ for(ll i=1;i<=n/2;i++){ ans.pb(x-i); ans.pb(x+i); } } printv(ans); return 0; } }; /* --------------------MAIN PROGRAM----------------------------*/ int main() { speed; /* #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif */ ll TestCase=1; cin>>TestCase; while(TestCase--){ Codeforces cf; cf.solve(); } } /* -----------------END OF PROGRAM --------------------*/ /* * stuff you should look before submission * constraint and time limit * int overflow * special test case (n=0||n=1||n=2) * don't get stuck on one approach if you get wrong answer */