#include <bits/stdc++.h>
using namespace std;
long long int inf = 1e18;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  vector<long long int> a(n), b(n);
  for (long long int i = 0; i < n; ++i) cin >> a[i];
  for (long long int i = 0; i < n; ++i) cin >> b[i];
  map<long long int, vector<long long int>> ma;
  for (long long int i = 0; i < n; ++i) ma[b[i] % n].push_back(b[i]);
  for (long long int i = 0; i < n; ++i) {
    long long int c;
    if (a[i] % n != 0 and ma.find(n - (a[i] % n)) != ma.end()) {
      c = 0;
      ma[n - (a[i] % n)].pop_back();
      if (ma[n - (a[i] % n)].size() == 0) ma.erase(n - (a[i] % n));
    } else if (a[i] % n == 0 and ma.find(0) != ma.end()) {
      c = 0;
      ma[0].pop_back();
      if (ma[0].size() == 0) ma.erase(0);
    } else {
      long long int req;
      if (a[i] % n)
        req = n - a[i] % n;
      else
        req = 0;
      auto k = ma.lower_bound(req);
      if (k == ma.end()) k = ma.lower_bound(0);
      c = (a[i] + k->first) % n;
      k->second.pop_back();
      if (k->second.size() == 0) ma.erase(k->first);
    }
    cout << c << " ";
  }
  return 0;
}
