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.math.*;
import java.util.*;
import java.lang.*;
 
public class Main2{ 
 
    public static InputStream inputStream = System.in;
    public static OutputStream outputStream = System.out;
    public static FastReader in = new FastReader(inputStream);
    public static PrintWriter out = new PrintWriter(outputStream);
 
    public static void main(String[] args)throws java.lang.Exception{
        new Main2().run();
        out.close();
    }
    
    int n1;
    int n2;
    char[] x;
    char[] y;
    int k;
    int[][] dp1;
    int[][] dp2;
    int[][] dp3;
    int[][] dp4;
    
    void init(int[][] x){
        for(int i=0; i<x.length; i++){
            Arrays.fill(x[i], -1);
        }
    }
    
    void run()throws java.lang.Exception{
//      for(int i=0; i<30000; i++){
//          System.out.println(1000000000);
//      }
        int n = in.nextInt();
        Obj[] a = new Obj[n];
        for(int i=0; i<n; i++){
            a[i] = new Obj(i, in.nextInt());
        }
        Arrays.sort(a);
//      for(int i=0; i<n; i++){
//          System.out.println(a[i].v + " " + a[i].x);
//      }
        int l = -1;
        int[] ans = new int[n];
        for(int i=0; i<n; i++){
            if(a[i].v<=l){
                l++;
                ans[a[i].x] = l;
            }else{
                l = a[i].v;
                ans[a[i].x] = l;
            }
        }
        for(int i=0; i<n-1; i++){
            out.print(ans[i] + " ");
        }
        out.println(ans[n-1]);
    }
}

class Obj implements Comparable<Obj>{
    int x;
    int v;
    public Obj(int x, int v){
        this.x = x;
        this.v = v;
    }
    public int compareTo(Obj that){
        int c = Integer.valueOf(v).compareTo(that.v);
        return c;
    }
}
 
class FastReader{
    private boolean finished = false;
 
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;
 
    public FastReader(InputStream stream){
        this.stream = stream;
    }
 
    public int read(){
        if (numChars == -1){
            throw new InputMismatchException ();
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                throw new InputMismatchException ();
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar++];
    }
 
    public int peek(){
        if (numChars == -1){
            return -1;
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                return -1;
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar];
    }
 
    public int nextInt(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        int res = 0;
        do{
            if(c==','){
                c = read();
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }
 
    public long nextLong(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        long res = 0;
        do{
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }
 
    public String nextString(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        StringBuilder res = new StringBuilder ();
        do{
            res.appendCodePoint (c);
            c = read ();
        } while (!isSpaceChar (c));
        return res.toString ();
    }
 
    public boolean isSpaceChar(int c){
        if (filter != null){
            return filter.isSpaceChar (c);
        }
        return isWhitespace (c);
    }
 
    public static boolean isWhitespace(int c){
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }
 
    private String readLine0(){
        StringBuilder buf = new StringBuilder ();
        int c = read ();
        while (c != '\n' && c != -1){
            if (c != '\r'){
                buf.appendCodePoint (c);
            }
            c = read ();
        }
        return buf.toString ();
    }
 
    public String nextLine(){
        String s = readLine0 ();
        while (s.trim ().length () == 0)
            s = readLine0 ();
        return s;
    }
 
    public String nextLine(boolean ignoreEmptyLines){
        if (ignoreEmptyLines){
            return nextLine ();
        }else{
            return readLine0 ();
        }
    }
 
    public BigInteger nextBigInteger(){
        try{
            return new BigInteger (nextString ());
        } catch (NumberFormatException e){
            throw new InputMismatchException ();
        }
    }
 
    public char nextCharacter(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        return (char) c;
    }
 
    public double nextDouble(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        double res = 0;
        while (!isSpaceChar (c) && c != '.'){
            if (c == 'e' || c == 'E'){
                return res * Math.pow (10, nextInt ());
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        }
        if (c == '.'){
            c = read ();
            double m = 1;
            while (!isSpaceChar (c)){
                if (c == 'e' || c == 'E'){
                    return res * Math.pow (10, nextInt ());
                }
                if (c < '0' || c > '9'){
                    throw new InputMismatchException ();
                }
                m /= 10;
                res += (c - '0') * m;
                c = read ();
            }
        }
        return res * sgn;
    }
 
    public boolean isExhausted(){
        int value;
        while (isSpaceChar (value = peek ()) && value != -1)
            read ();
        return value == -1;
    }
 
    public String next(){
        return nextString ();
    }
 
    public SpaceCharFilter getFilter(){
        return filter;
    }
 
    public void setFilter(SpaceCharFilter filter){
        this.filter = filter;
    }
 
    public interface SpaceCharFilter{
        public boolean isSpaceChar(int ch);
    }
}