#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n;
cin >> n;
vector<ll> a(n), b(n);
set<ll> s;
vector<ll> cnts(n);
for (ll i = 0; i < n; i++) {
cin >> a[i];
}
for (ll i = 0; i < n; i++) {
cin >> b[i];
cnts[b[i]]++;
if (cnts[b[i]] == 1) {
s.insert(b[i]);
}
}
for (ll i = 0; i < n; i++) {
auto it = s.lower_bound(n - a[i]);
ll num = *it;
if (it == s.end() && *it < n - a[i]) {
num = *s.lower_bound(a[i]);
}
cout << (a[i] + num) % n << ' ';
cnts[num]--;
if (cnts[num] == 0) {
s.erase(num);
}
}
cout << endl;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIGxsID0gbG9uZyBsb25nOwp1c2luZyBsZCA9IGxvbmcgZG91YmxlOwp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKGZhbHNlKTsKICAgIGNpbi50aWUoTlVMTCk7CgogICAgbGwgbjsKICAgIGNpbiA+PiBuOwogICAgdmVjdG9yPGxsPiBhKG4pLCBiKG4pOwogICAgc2V0PGxsPiBzOwogICAgdmVjdG9yPGxsPiBjbnRzKG4pOwogICAgZm9yIChsbCBpID0gMDsgaSA8IG47IGkrKykgewoJY2luID4+IGFbaV07CiAgICB9CiAgICBmb3IgKGxsIGkgPSAwOyBpIDwgbjsgaSsrKSB7CgljaW4gPj4gYltpXTsKCWNudHNbYltpXV0rKzsKCWlmIChjbnRzW2JbaV1dID09IDEpIHsKCSAgICBzLmluc2VydChiW2ldKTsKCX0KICAgIH0KCiAgICBmb3IgKGxsIGkgPSAwOyBpIDwgbjsgaSsrKSB7CglhdXRvIGl0ID0gcy5sb3dlcl9ib3VuZChuIC0gYVtpXSk7CglsbCBudW0gPSAqaXQ7CglpZiAoaXQgPT0gcy5lbmQoKSAmJiAqaXQgPCBuIC0gYVtpXSkgewoJICAgIG51bSA9ICpzLmxvd2VyX2JvdW5kKGFbaV0pOwoJfQoJY291dCA8PCAoYVtpXSArIG51bSkgJSBuIDw8ICcgJzsKCWNudHNbbnVtXS0tOwoJaWYgKGNudHNbbnVtXSA9PSAwKSB7CgkgICAgcy5lcmFzZShudW0pOwoJfQogICAgfQogICAgY291dCA8PCBlbmRsOwp9