You are given two arrays a and b, both of length n. All elements of both arrays are from 0 to n-1.

You can reorder elements of the array b (if you want, you may leave the order of elements as it is). After that, let array c be the array of length n, the i-th element of this array is c_i = (a_i + b_i) \% n, where x \% y is x modulo y.

Your task is to reorder elements of the array b to obtain the lexicographically minimum possible array c.

Array x of length n is lexicographically less than array y of length n, if there exists such i (1 ≤ i ≤ n), that x_i < y_i, and for any j (1 ≤ j < i) x_j = y_j.

Input

The first line of the input contains one integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of elements in a, b and c.

The second line of the input contains n integers a_1, a_2, ..., a_n (0 ≤ a_i < n), where a_i is the i-th element of a.

The third line of the input contains n integers b_1, b_2, ..., b_n (0 ≤ b_i < n), where b_i is the i-th element of b.

Output

Print the lexicographically minimum possible array c. Recall that your task is to reorder elements of the array b and obtain the lexicographically minimum possible array c, where the i-th element of c is c_i = (a_i + b_i) \% n.

Examples

Input


4
0 1 2 1
3 2 1 1


Output


1 0 0 2 


Input


7
2 5 1 5 3 4 3
2 4 3 5 6 5 1


Output


0 0 0 1 0 2 4 
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        EMinimalniiMassiv solver = new EMinimalniiMassiv();
        solver.solve(1, in, out);
        out.close();
    }

    static class EMinimalniiMassiv {

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            int[] ct = new int[n];
            for (int i = 0; i < n; i++) {
                ct[in.nextInt()]++;
            }

            EMinimalniiMassiv.SegmentTree tree = new EMinimalniiMassiv.SegmentTree(n);
            tree.build(ct, 1, 0, n - 1);
            int[] ans = new int[n];

            for (int i = 0; i < n; i++) {
                boolean found = false;
                int val = -1;
                if (n - a[i] < n) {
                    val = tree.query(1, 0, n - 1, n - a[i], n - 1).value;
                    if (val != Integer.MAX_VALUE) {
                        found = true;
                    }
                }
                if (!found) {
                    val = tree.query(1, 0, n - 1, 0, n - 1).value;
                }
                ans[i] = (val + a[i]) % n;
                tree.update(1, 0, n - 1, val);
            }
            for (int i = 0; i < n; i++) {
                out.print(ans[i]);
                out.print(' ');
            }
        }

        public static class SegmentTree {

            public EMinimalniiMassiv.SegmentTree.Data[] t;

            public SegmentTree(int n) {
                this.t = new EMinimalniiMassiv.SegmentTree.Data[n * 4 + 1];
                for (int i = 0; i < n * 4 + 1; i++) {
                    this.t[i] = new EMinimalniiMassiv.SegmentTree.Data();
                }
            }

            public void build(int a[], int v, int tl, int tr) {
                if (tl == tr) {
                    t[v].value = a[tl] > 0 ? tl : Integer.MAX_VALUE;
                    t[v].count = a[tl];
                } else {
                    int tm = (tl + tr) / 2;
                    build(a, v * 2, tl, tm);
                    build(a, v * 2 + 1, tm + 1, tr);
                    t[v].combine(t[v * 2], t[v * 2 + 1]);
                }
            }

            public void update(int v, int tl, int tr, int pos) {
                if (tl == tr) {
                    t[v].update();
                } else {
                    int tm = (tl + tr) / 2;
                    if (pos <= tm) {
                        update(v * 2, tl, tm, pos);
                    } else {
                        update(v * 2 + 1, tm + 1, tr, pos);
                    }
                    t[v].combine(t[v * 2], t[v * 2 + 1]);
                }
            }

            public EMinimalniiMassiv.SegmentTree.Data query(int v, int tl, int tr, int l, int r) {
                if (l == tl && tr == r) {
                    return t[v];
                }
                int tm = (tl + tr) / 2;
                if (r <= tm) {
                    return query(v * 2, tl, tm, l, r);
                }
                if (l > tm) {
                    return query(v * 2 + 1, tm + 1, tr, l, r);
                }
                return new EMinimalniiMassiv.SegmentTree.Data().combine(query(v * 2, tl, tm, l, Math.min(tm, r)),
                        query(v * 2 + 1, tm + 1, tr, Math.max(l, tm + 1), r));
            }

            public static class Data {

                int value;
                int count;

                public void update() {
                    this.count--;
                    if (this.count <= 0) {
                        value = Integer.MAX_VALUE;
                    }
                }

                public EMinimalniiMassiv.SegmentTree.Data combine(EMinimalniiMassiv.SegmentTree.Data a,
                                                                  EMinimalniiMassiv.SegmentTree.Data b) {
                    this.value = Math.min(a.value, b.value);
                    return this;
                }
            }
        }
    }

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}

