#include <bits/stdc++.h>
using namespace std;
int n, BIT[200005], pp;
void upd(int x, int y) {
  for (; x <= n; x += x & -x) BIT[x] += y;
}
int query(int x) {
  int res = 0;
  for (; x > 0; x -= x & -x) res += BIT[x];
  return res;
}
bool f(int l, int r) {
  int ret = -1, q, p, mid;
  q = query(l - 1);
  while (l <= r) {
    mid = (l + r) / 2;
    p = query(mid) - q;
    if (p)
      ret = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  if (ret == -1) return 0;
  upd(ret, -1);
  cout << (pp + ret - 1) % n << " ";
  return 1;
}
int main() {
  int i, a[200005], x;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 1; i <= n; i++) {
    cin >> x;
    upd(x + 1, 1);
  }
  for (i = 1; i <= n; i++) {
    int val = a[i];
    pp = a[i];
    x = f(n - val + 1, n);
    if (!x) x = f(1, n - val);
  }
}
