#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
const int oo = maxn;
int n;
int a[maxn], b[maxn], c[maxn], it[maxn * 8], itmin[maxn * 8];
int findit(int u, int v, int l, int r, int i) {
  if (r < u || v < l) return oo;
  if (u <= l && r <= v) {
    return (itmin[i]);
  }
  int mid = (l + r) >> 1;
  return (
      min(findit(u, v, l, mid, i * 2), findit(u, v, mid + 1, r, i * 2 + 1)));
}
void updateit(int u, int w, int l, int r, int i) {
  if (r < u || u < l) return;
  if (u == l && u == r) {
    it[i] += w;
    if (it[i] == 0)
      itmin[i] = oo;
    else
      itmin[i] = u;
    return;
  }
  int mid = (l + r) >> 1;
  updateit(u, w, l, mid, i * 2);
  updateit(u, w, mid + 1, r, i * 2 + 1);
  if (it[i * 2] == 0) {
    it[i] = it[i * 2 + 1];
    itmin[i] = itmin[i * 2 + 1];
    return;
  }
  if (it[i * 2 + 1] == 0) {
    it[i] = it[i * 2];
    itmin[i] = itmin[i * 2];
    return;
  }
  it[i] = it[i * 2] + it[i * 2 + 1];
  itmin[i] = min(itmin[i * 2], itmin[i * 2 + 1]);
}
void nhap() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    updateit(i, 0, 1, n, 1);
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i] %= n;
  }
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
    b[i] %= n;
    updateit(b[i] + 1, 1, 1, n, 1);
  }
}
void xuli() {
  for (int i = 1; i <= n; i++) c[i] = -1;
  for (int i = 1; i <= n; i++) {
    int x = n - a[i];
    int j = findit(x + 1, n, 1, n, 1);
    if (j != oo) {
      c[i] = (a[i] + j - 1) % n;
      updateit(j, -1, 1, n, 1);
      continue;
    } else {
      j = findit(1, n, 1, n, 1);
      c[i] = (a[i] + j - 1) % n;
      updateit(j, -1, 1, n, 1);
      continue;
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << c[i] << " ";
  }
}
int main() {
  nhap();
  xuli();
}
