#include <bits/stdc++.h>
using namespace std;
const int o_o = 2e5 + 5;
const int mod = 1e9 + 7;
const int oo = 0x7fffffff;
const int sup = 0x80000000;
int a[o_o];
int b[o_o] = {0};
int c[o_o];
int main() {
  int n;
  cin >> n;
  std::set<int> d;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    a[i] = n - a[i];
  }
  for (int i = 1; i <= n; i++) {
    int u;
    scanf("%d", &u);
    d.insert(u);
    b[u]++;
  }
  for (int i = 1; i <= n; i++) {
    set<int>::iterator x = d.end();
    x--;
    if (a[i] > (*x)) {
      c[i] = (n - a[i] + *d.begin()) % n;
      if (--b[*d.begin()] == 0) d.erase(d.begin());
      continue;
    }
    set<int>::iterator it = d.lower_bound(a[i]);
    c[i] = (*it - a[i]) % n;
    if (--b[*it] == 0) d.erase(it);
  }
  for (int i = 1; i <= n; i++) printf("%d ", c[i]);
}
