#include <bits/stdc++.h>

using namespace std;


#define ll long long

int main()
{
    int t;
    cin>>t;



    while(t--)
    {
         ll n,l,r,sum;
         cin>>n>>l>>r>>sum;

         ll rem = ((r-l)*(r-l+1))/2;

         ll big=n;

         vector <ll> ans;

         //bada lo pahle
bool mila=true;

      unordered_set <ll> st;
      for(int i=1;i<=n;++i)
        st.insert(i);

         for(ll i=l;i<=r;++i)
         {

              ll smallest = r-i;

             if(sum-rem>big)
             {
                ans.push_back(big);
                 st.erase(big);
                sum-=big;
                rem-=smallest;

                --big;
             }
             else
             {
                 //take big=sum-rem;

                  big = sum-rem;

                  if(big<=smallest)
                  {
                      mila=false;
                      break;
                  }
                  else
                  {
                      st.erase(big);
                      ans.push_back(big);
                      sum-=big;
                      rem-=smallest;
                      --big;
                  }



             }



         }
         if(sum!=0)
         {
             mila=false;
         }

       if(mila)
       {
           for(ll i=1;i<=n;++i)
           {
               if(i==l)
               {
                   for(int j=0;j<ans.size();++j)
                    cout<<ans[j]<<" ";

                   i=r;

               }
               else
               {
                   cout<<(*(st.begin()))<<" ";
                   st.erase(st.begin());
               }


           }
           cout<<endl;

       }
       else
        cout<<-1<<endl;

    }




    return 0;
}
