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.BigInteger;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Queue;
import java.util.Set;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.LinkedBlockingQueue;

public class Main {
    public static void main(String[] argv) {
        MainRun mainSolve = new MainRun();
        mainSolve.run(0, 0);
    }
}

class Gift {
	int a = 0;
	int num = 0;
	int b = 0;
	Gift(int a, int num, int b) {
		this.a = a;
		this.b = b;
		this.num = num;
	}
}

class ComporatorForGift implements Comparator<Gift> {

	@Override
	public int compare(Gift o, Gift o2) {
		if (o.a > o2.a)
			return 1;
		else
			if (o.a < o2.a)
				return -1;
			else
				return 0;
	}
}

class Task {
    public void solve(InputReader in, PrintWriter out) {
    	int n = in.nextInt();
    	Gift g[] = new Gift[n];
    	for (int i = 0; i < n; i++) {
    		g[i] = new Gift(in.nextInt(), i + 1, -1);
    	}
    	Arrays.sort(g, new ComporatorForGift());
    	TreeSet<Integer> st = new TreeSet<Integer>();
    	int X = g[0].a;
    	for (int i = 0; i < n; i++) {
    		g[i].b = X;
    		st.add(X);
    		if (i + 1 < n) {
    			X = Math.max(g[i + 1].a, X + 1);
    			while (st.contains(X))
    				X++;
    		}
    	}
    	
    	int b[] = new int[n + 1];
    	for (int i = 0; i < n; i++)
    		b[g[i].num] = g[i].b;
    	for (int i = 1; i <= n; i++) 
    		out.print(b[i] + " ");
    }
}

class MainRun {
	void run(int inF, int outF) {
//		inF = outF = 0;
		String input = "input.txt";
//		String input = "primes.in";	
		String output = "output.txt";
//		String output = "primes.out";
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in;
		PrintWriter out;
		if (inF == 1)	
			in = new InputReader(input);
		else
			in = new InputReader(inputStream);
		if (outF == 1)
			out = getPrintWriter(output);
		else
			out = getPrintWriter(outputStream);
		Task solver = new Task();
		solver.solve(in, out);
		out.close();
	}
	public static PrintWriter getPrintWriter(OutputStream stream) {
		return new PrintWriter(stream);
	}
	public static PrintWriter getPrintWriter(String f) {
		try {
			return new PrintWriter(new File(f));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		return null;
	}	
}

class InputReader {
	BufferedReader reader;
	StringTokenizer tokenizer;
	InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream));
		tokenizer = null;
	}
	InputReader(String f) {
		try {
			reader = new BufferedReader(new FileReader(f));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		tokenizer = null;		
	}
	public String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch(IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
	public String getLine() {
		try {
			return (String)reader.readLine();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "";
	}	
	public int nextInt() {
		return Integer.parseInt(next());
	}
	public char nextChar() {
		return next().charAt(0);
	}	
	public long nextLong() {
		return Long.parseLong(next());
	}
	public double nextDouble() {
		return Double.parseDouble(next());
	}
	public int[] nextIntArray(int n) {
		int a[] = new int[n + 2];
		for (int i = 1; i <= n; i++)
			a[i] = nextInt();
		return a;
	}
}