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.*;
import java.util.*; // тут лежат все коллекции, Random

// имя начинается с двух подчеркиваний, чтобы был первым в списке (он сортится по алфавиту)
public class pol {

    // определяет, запускается решение "дома" или на CF/timus
    static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    public static void main(String[] args) {
        new pol().run();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    void init() throws FileNotFoundException {
        // иницилизация потоков вводилок/выводилок
        // System.in/System.out - стандартные потоки ввода/вывода на консоль

        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }

        tok = new StringTokenizer("");
    }

    void run() {
        try {
            long timeStart = System.currentTimeMillis();

            init();
            solve();

            out.close();

            long timeEnd = System.currentTimeMillis();
            System.err.println("Time = " + (timeEnd - timeStart));
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    // чтение строки вернет null, если ничего не осталось
    String readLine() throws IOException {
        return in.readLine();
    }

    // содержит символы, являющиеся "разделителями ввода"
    // по умолчанию это пробел (перевод строки автоматом учитывается)
    String delimiter = " ";

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            String nextLine = readLine();
            if (null == nextLine) return null;

            tok = new StringTokenizer(nextLine);
        }

        return tok.nextToken(delimiter);
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }
    List<Integer>[] tree;
    // тут мы будем писать основное решение
    void solve() throws IOException {
        Map<Integer,Integer> was = new HashMap<>();
        List<Integer> tt;
        int n = readInt();
        for (int i = 0; i < n; i++) {
            int now = readInt();
            if (was.containsKey(now)) {
                tt = new ArrayList<>();
                int j = was.get(now)+now;
                while (was.containsKey(j)) {
                    tt.add(j);
                    j += was.get(j);
                }
                for (int ai : tt) {
                    was.put(ai, j-ai);
                }
                out.print(j);
                out.print(" ");
                was.put(j,1);
            } else {
                was.put(now,1);
                out.print(now);
                out.print(" ");
            }
        }
    }
}