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.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {
	class A implements Comparable<A>{
		public int id;
		public int w;
		public  A(int i,int ww){
			id=i;
			w=ww;
		}
		@Override
		public int compareTo(A a) {
			// TODO Auto-generated method stub
			return Integer.compare(w, a.w);
		}
	}

	/**
	 * @param args
	 */
	 BufferedReader in;
	    PrintWriter out = new PrintWriter(System.out);
	    StringTokenizer tok;
	   
	     String readToken() throws IOException { // reads the token; to read a full line use in.readLine()
	    while (tok == null || !tok.hasMoreTokens()) {
	    tok = new StringTokenizer(in.readLine());
	    	
	    }
	    return tok.nextToken(); // sometimes it's better to use nextToken(String) method here
	    }
	     int readInt() throws IOException { // write readDouble(), readLong(), readBigInteger() methods if necessary
	    return Integer.parseInt(readToken());
	    }
	     public String readLine() throws IOException{
			return in.readLine();
	    	 
	     }
	     long readLong() throws IOException { // write readDouble(), readLong(), readBigInteger() methods if necessary
	    	    return Long.parseLong(readToken());
	    	    }
	     double readDouble() throws IOException { // write readDouble(), readLong(), readBigInteger() methods if necessary
	    	    return Double.parseDouble(readToken());
	    	    }
	    public static void main(String[] args) throws IOException
	    {
	       new Main().run();
	    }
	    void run() throws IOException
	    {
	    	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	    	out = new PrintWriter(new OutputStreamWriter(System.out));
	    	in = new BufferedReader(new InputStreamReader(System.in));
	    	if (oj){
	    
	    	}
	    	else{
	    		
	    		
	    	}
	       solve();
	       out.flush();
	       tok=null;
	    }
	  
	    
	    void solve() throws IOException{
	    	/*
	    	 * taksinomw kai dinw ston i-osto mikrotero to elaxisto poso pou kaliptei tis anagkes tou 
	    	 * kai pou den ehei dwthei proigoumenws.
	    	 * estw  x to prwto pou einai diaforetiko. Kseroume oti ehei megalitero apo to diko mas.
	    	 * Opote afou to meiwnoume auto parlalila boroume na meiwsoume kai ola ta alla ta epomena kata kapoies monades
	    	 * i an ta afisoume idia an dn einai dinaton. Se kathe periptwsi omws, ehoume meiwsi!
	    	 */
	    	int n=readInt();
	    	A[] A=new A[n];
	    	int[] B=new int[n];
	    	for (int i=0;i<n;i++){
	    		A[i]=new A(i,readInt());
	    	}
	    	Arrays.sort(A);
	    	int last_given=0;
	    	for (int i=0;i<n;i++){
	    		if (last_given<A[i].w){
	    			B[A[i].id]=A[i].w;
	    			last_given=A[i].w;
	    		}else{
	    			B[A[i].id]=last_given+1;
	    			last_given++;
	    		}
	    	}
	    	for (int i=0;i<n;i++){
	    		out.print(B[i]+" ");
	    	}

	    	}
	    
}