text: #if defined(LOCAL)
  #define PROBLEM_NAME "CanidsSeesaw"
  const double _max_double_error = 1e-9;
  #include "testutils.h"
  #define L(x...) debug(x)
  #else
  #define L(x, ...) (x)
  #include <bits/stdc++.h>
  #endif
  
  using namespace std;
  using vi = vector<int>; using vvi = vector<vi>;
  using ii = pair<int,int>; using vii = vector<ii>;
  using l = long long; using vl = vector<l>; using vvl = vector<vl>;
  using ll = pair<l,l>; using vll = vector<ll>; using vvll = vector<vll>;
  using lu = unsigned long long;
  using vb = vector<bool>; using vvb = vector<vb>;
  using vd = vector<double>; using vvd = vector<vd>;
  using mll = unordered_map<l, l>;
  const l INF = numeric_limits<l>::max();
  const double EPS = 1e-10; static constexpr auto PI = acos(-1);
  const l e0=1, e3=1000, e5=100000, e6=10*e5, e7=10*e6, e8=10*e7, e9=10*e8;
  const char lf = '\n';
  #define all(x) begin(x), end(x)
  #define F(a,b,c) for (l a = l(b); a < l(c); a++)
  #define B(a,b,c) for (l a = l(c) - 1; a >= l(b); a--)
  
  #if defined(LOCAL)
  #define L(x...) debug(x)
  #else
  #define L(x, ...) (x)
  #endif
  
  class CanidsSeesaw {
  public:
    l N;
    vector <int> construct(vector <int> wolf, vector <int> fox, int K) {
      N = wolf.size();
      vi fp(N);
      F(i, 0, N) fp[i] = i;
      sort(all(fp), [&](int a, int b) {return fox[a] < fox[b];});
      B(i, 0, N) {
        F(k, i, N) {
          if (k + 1 < N) swap(fp[k], fp[k + 1]);
          l score = 0;
          l a = 0, b = 0;
          F(j, 0, N) {
            a += wolf[j]; b += fox[fp[j]];
            if (a < b) score++;
          }
          if (score == K) return fp;
        }
      }
      vector<int> no;
      return no;
    }
    // BEGIN CUT HERE
  public:
    void run_test(int Case) { if ((Case == -1) || (Case == 0)) test_case_0(); if ((Case == -1) || (Case == 1)) test_case_1(); if ((Case == -1) || (Case == 2)) test_case_2(); if ((Case == -1) || (Case == 3)) test_case_3(); if ((Case == -1) || (Case == 4)) test_case_4(); }
  private:
    template <typename T> string print_array(const vector<T> &V) { ostringstream os; os << "{ "; for (typename vector<T>::const_iterator iter = V.begin(); iter != V.end(); ++iter) os << '\"' << *iter << "\","; os << " }"; return os.str(); }
    void verify_case(int Case, const vector <int> &Expected, const vector <int> &Received) { cerr << "Test Case #" << Case << "..."; if (Expected == Received) cerr << "PASSED" << endl; else { cerr << "FAILED" << endl; cerr << "\tExpected: " << print_array(Expected) << endl; cerr << "\tReceived: " << print_array(Received) << endl; } }
    void test_case_0() { int Arr0[] = {3,1}; vector <int> Arg0(Arr0, Arr0 + (sizeof(Arr0) / sizeof(Arr0[0]))); int Arr1[] = {4,2}; vector <int> Arg1(Arr1, Arr1 + (sizeof(Arr1) / sizeof(Arr1[0]))); int Arg2 = 1; int Arr3[] = {1, 0 }; vector <int> Arg3(Arr3, Arr3 + (sizeof(Arr3) / sizeof(Arr3[0]))); verify_case(0, Arg3, construct(Arg0, Arg1, Arg2)); }
    void test_case_1() { int Arr0[] = {1,3}; vector <int> Arg0(Arr0, Arr0 + (sizeof(Arr0) / sizeof(Arr0[0]))); int Arr1[] = {4,2}; vector <int> Arg1(Arr1, Arr1 + (sizeof(Arr1) / sizeof(Arr1[0]))); int Arg2 = 1; int Arr3[] = { }; vector <int> Arg3(Arr3, Arr3 + (sizeof(Arr3) / sizeof(Arr3[0]))); verify_case(1, Arg3, construct(Arg0, Arg1, Arg2)); }
    void test_case_2() { int Arr0[] = {10,10,10,10,10,10,10,10,10,10}; vector <int> Arg0(Arr0, Arr0 + (sizeof(Arr0) / sizeof(Arr0[0]))); int Arr1[] = {1,100,1,100,1,100,1,100,1,100}; vector <int> Arg1(Arr1, Arr1 + (sizeof(Arr1) / sizeof(Arr1[0]))); int Arg2 = 7; int Arr3[] = {0, 2, 4, 1, 6, 3, 5, 7, 9, 8 }; vector <int> Arg3(Arr3, Arr3 + (sizeof(Arr3) / sizeof(Arr3[0]))); verify_case(2, Arg3, construct(Arg0, Arg1, Arg2)); }
    void test_case_3() { int Arr0[] = {10,10,10,10,10,10,10,10,10,10}; vector <int> Arg0(Arr0, Arr0 + (sizeof(Arr0) / sizeof(Arr0[0]))); int Arr1[] = {1,100,1,100,1,100,1,100,1,100}; vector <int> Arg1(Arr1, Arr1 + (sizeof(Arr1) / sizeof(Arr1[0]))); int Arg2 = 4; int Arr3[] = { }; vector <int> Arg3(Arr3, Arr3 + (sizeof(Arr3) / sizeof(Arr3[0]))); verify_case(3, Arg3, construct(Arg0, Arg1, Arg2)); }
    void test_case_4() { int Arr0[] = {2}; vector <int> Arg0(Arr0, Arr0 + (sizeof(Arr0) / sizeof(Arr0[0]))); int Arr1[] = {1}; vector <int> Arg1(Arr1, Arr1 + (sizeof(Arr1) / sizeof(Arr1[0]))); int Arg2 = 0; int Arr3[] = {0 }; vector <int> Arg3(Arr3, Arr3 + (sizeof(Arr3) / sizeof(Arr3[0]))); verify_case(4, Arg3, construct(Arg0, Arg1, Arg2)); }
  
    // END CUT HERE
    ;
  };
  
  // BEGIN CUT HERE
  void solve(istream&, ostream&) {}
  int main() {
    CanidsSeesaw ___test;
    ___test.run_test(-1);
  }
  // END CUT HERE
  