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.awt.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.ParseException;
import java.util.*;
import java.util.List;

import static java.lang.Math.max;

public class Main implements Runnable {
    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    final Scanner in;
    Writer out;
    long timeBegin, timeEnd;

    public Main() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        if (ONLINE_JUDGE) {
            in = new Scanner(new InputStreamReader(System.in));
            out = new Writer(System.out);
        } else {
            in = new Scanner(new FileReader("input.txt"));
            //out = new Writer("output.txt");
            out = new Writer(System.out);
        }
    }

    public static void main(String[] args) throws FileNotFoundException {
        new Thread(null, new Main(), "", 128 * (1L << 20)).start();
    }

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time: " + (timeEnd - timeBegin) + "ms");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    void solve() throws IOException, ParseException {
        int n = in.nextInt();
        ArrayList<Pair<Integer>> a = in.nextIndexedIntArrayList(n);
        Collections.sort(a, new Comparator<Pair<Integer>>() {
            @Override
            public int compare(Pair<Integer> o1, Pair<Integer> o2) {
                return o1.x - o2.x;
            }
        });
        int c = 0;
        int[] ans = new int[n];
        for (int i = 0; i < n; ++i) {
            c = max(c, a.get(i).x);
            ans[a.get(i).y] = c;
            c++;
        }
        out.printArray(ans);
    }
}

class Pair<T> {
    T x;
    T y;

    Pair(T x, T y) {
        this.x = x;
        this.y = y;
    }
}

class Scanner {
    BufferedReader in;
    StringTokenizer stringTokenizer;

    public Scanner(InputStreamReader inputStreamReader) throws FileNotFoundException {
        in = new BufferedReader(inputStreamReader);
    }

    String next() {
        while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {
            try {
                stringTokenizer = new StringTokenizer(in.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return stringTokenizer.nextToken();
    }

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

    int[] nextIntArray(int size) throws IOException {
        int[] array = new int[size];
        for (int index = 0; index < size; ++index) {
            array[index] = nextInt();
        }
        return array;
    }

    ArrayList<Integer> nextIntArrayList(int size) {
        ArrayList<Integer> result = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            result.add(nextInt());
        }
        return result;
    }

    ArrayList<Pair<Integer>> nextIndexedIntArrayList(int size) {
        ArrayList<Pair<Integer>> result = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            result.add(new Pair<>(nextInt(), i));
        }
        return result;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    long[] readLongArray(int size) throws IOException {
        long[] array = new long[size];
        for (int index = 0; index < size; ++index) {
            array[index] = nextLong();
        }
        return array;
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    double[] readDoubleArray(int size) throws IOException {
        double[] array = new double[size];

        for (int index = 0; index < size; ++index) {
            array[index] = nextDouble();
        }

        return array;
    }

    char nextChar() throws IOException {
        int intValue = in.read();
        while (intValue == 10 || intValue == 13) {
            intValue = in.read();
        }
        if (intValue == -1) {
            return '\0';
        }
        return (char) intValue;
    }

    char[] readCharArray() throws IOException {
        return nextLine().toCharArray();
    }

    BigInteger readBigInteger() throws IOException {
        return new BigInteger(next());
    }

    BigDecimal readBigDecimal() throws IOException {
        return new BigDecimal(next());
    }

    Point nextPoint() throws IOException {
        int x = nextInt(), y = nextInt();
        return new Point(x, y);
    }

    Point[] nextPointArray(int size) throws IOException {
        Point[] array = new Point[size];

        for (int index = 0; index < size; ++index) {
            array[index] = nextPoint();
        }

        return array;
    }

    List<Integer>[] readGraph(int vertexNumber, int edgeNumber) throws IOException {
        @SuppressWarnings("unchecked")
        List<Integer>[] graph = new List[vertexNumber];

        for (int index = 0; index < vertexNumber; ++index) {
            graph[index] = new ArrayList<>();
        }

        while (edgeNumber-- > 0) {
            int from = nextInt() - 1;
            int to = nextInt() - 1;

            graph[from].add(to);
            graph[to].add(from);
        }

        return graph;
    }


    String nextLine() {
        String str = "";
        try {
            str = in.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}

class Writer extends PrintWriter {
    final int DEFAULT_PRECISION = 12;

    int precision;
    String format, formatWithSpace;

    {
        precision = DEFAULT_PRECISION;

        format = createFormat(precision);
        formatWithSpace = format + " ";
    }

    public Writer(OutputStream out) {
        super(out);
    }

    public Writer(String fileName) throws FileNotFoundException {
        super(fileName);
    }

    public int getPrecision() {
        return precision;
    }

    public void setPrecision(int precision) {
        precision = max(0, precision);
        this.precision = precision;

        format = createFormat(precision);
        formatWithSpace = format + " ";
    }

    public <T> void printMany(List<T> list) {
        for (T element : list) {
            print(element);
            print(" ");
        }
    }

    public void printArray(int[] a) {
        for (int element : a) {
            print(element);
            print(" ");
        }
    }

    private String createFormat(int precision) {
        return "%." + precision + "f";
    }

    @Override
    public void print(double d) {
        printf(format, d);
    }

    public void printWithSpace(double d) {
        printf(formatWithSpace, d);
    }

    public void printAll(double... d) {
        for (int i = 0; i < d.length - 1; ++i) {
            printWithSpace(d[i]);
        }

        print(d[d.length - 1]);
    }

    @Override
    public void println(double d) {
        printlnAll(d);
    }

    public void printlnAll(double... d) {
        printAll(d);
        println();
    }
}