Problem: One very well-known internet resource site (let's call it X) has come up with a New Year adventure. Specifically, they decided to give ratings to all visitors.

There are n users on the site, for each user we know the rating value he wants to get as a New Year Present. We know that user i wants to get at least ai rating units as a present.

The X site is administered by very creative and thrifty people. On the one hand, they want to give distinct ratings and on the other hand, the total sum of the ratings in the present must be as small as possible.

Help site X cope with the challenging task of rating distribution. Find the optimal distribution.

Input

The first line contains integer n (1 ≤ n ≤ 3·105) — the number of users on the site. The next line contains integer sequence a1, a2, ..., an (1 ≤ ai ≤ 109).

Output

Print a sequence of integers b1, b2, ..., bn. Number bi means that user i gets bi of rating as a present. The printed sequence must meet the problem conditions. 

If there are multiple optimal solutions, print any of them.

Examples

Input

3
5 1 1


Output

5 1 2


Input

1
1000000000


Output

1000000000

Solution (in JAVA):

Solution:
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;

public class C379 {
    public static void main(String[] args) {
        input();
        solve();
    }

    static void solve() {
        Arrays.sort(pos, new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return Integer.compare(a[o1], a[o2]);
            }
        });
        Arrays.sort(a);
        int cnt = 0;
        for (int i = 0; i < n - 1; i++) {
            if (a[i] - a[i + 1] == 0) {
                cnt++;
            }
        }
        if (cnt != 0) {
            int[] needChanges = new int[cnt];
            int[] canChanges = new int[cnt];
            int j = 0;
            int k = 0;
            for (int i = 0; i < n - 1; i++) {
                if (a[i] - a[i + 1] == 0) {
                    needChanges[j] = pos[i + 1];
                    j++;
                }
            }
            for (int i = 0; i < n - 1; i++) {
                if (a[i] - a[i + 1] != 0
                        && (k < cnt && a[i + 1] - 1 - res[needChanges[k]] > 0)) {
                    int temp = a[i] + 1;
                    while (k < cnt && temp - a[i + 1] < 0) {
                        if (res[needChanges[k]] < temp) {
                            canChanges[k] = temp;
                            k++;
                        }
                        temp++;
                    }
                }
            }
            int temp = a[n - 1] + 1;
            while (k < cnt) {
                if (res[needChanges[k]] - temp < 0) {
                    canChanges[k] = temp;
                    temp++;
                    k++;
                }
            }

            for (int i = 0; i < cnt; i++) {
                res[needChanges[i]] = canChanges[i];
            }
        }
        StringBuilder ans = new StringBuilder();
        for (int i = 0; i < n; i++) {
            ans.append(res[i] + " ");
        }
        System.out.println(ans);
    }

    /************************************************************************************/
    static int n;
    static Integer[] a;
    static Integer[] pos;
    static Integer[] res;

    static void input() {
        n = nextInt();
        a = new Integer[n];
        res = new Integer[n];
        pos = new Integer[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
            res[i] = a[i];
            pos[i] = i;
        }
    }

    /************************************************************************************/
    static InputStream is = System.in;
    static private byte[] buffer = new byte[1024];
    static private int lenbuf = 0, ptrbuf = 0;

    static private int readByte() {
        if (lenbuf == -1)
            throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(buffer);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0)
                return -1;
        }
        return buffer[ptrbuf++];
    }

    static private boolean isSpace(int c) {
        return !(c >= 33 && c <= 126);
    }

    static private int read() {
        int b;
        while ((b = readByte()) != -1 && isSpace(b))
            ;
        return b;
    }

    static private double nextDouble() {
        return Double.parseDouble(nextString());
    }

    static private char nextChar() {
        return (char) read();
    }

    static private String nextString() {
        int b = read();
        StringBuilder sb = new StringBuilder();
        while (!(isSpace(b))) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    static private char[] nextString(int n) {
        char[] buf = new char[n];
        int b = read(), p = 0;
        while (p < n && !(isSpace(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    static private int nextInt() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
            ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    static private long nextLong() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
            ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    static private int[] nextAi(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = nextInt();
        return a;
    }

    static private Integer[] nextAi1(int n) {
        Integer[] a = new Integer[n];
        for (int i = 0; i < n; i++)
            a[i] = nextInt();
        return a;
    }

}