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.IOError;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public class Main {

	FastIO scan = new FastIO();
	PrintWriter cout = new PrintWriter(System.out);

	final int maxn = 1000100;

	// int[] hehe = new int[maxn];
	boolean[] hash = new boolean[maxn];

	public int gao() {
		for (int i = maxn / 2; i >= 2; i--) {
			int cnt = 0;
			for (int j = i; j < maxn; j += i) {
				if (hash[j] == true)
					cnt++;
			}
			if (cnt >= 2) {
				return i;
			}
		}
		return 1;
	}

	class Point implements Comparable<Point> {
		int x, pos;

		@Override
		public int compareTo(Point o) {
			// TODO Auto-generated method stub
			return x - o.x;
		}
	}

	public void shuffleArray(Point[] arr) {
		int n = arr.length;
		Random rnd = new Random();
		for (int i = 1; i < n; ++i) {
			Point tmp = arr[i];
			int randomPos = i + rnd.nextInt(n - i);
			arr[i] = arr[randomPos];
			arr[randomPos] = tmp;
		}
	}

	public void run() {

		int n = scan.nextInt();
		Point[] p = new Point[n + 1];
		for (int i = 1; i <= n; i++) {
			p[i] = new Point();
			p[i].x = scan.nextInt();
			p[i].pos = i;
		}
		// Arr.shuffle(p, new Random(7));
		shuffleArray(p);
		Arrays.sort(p, 1, n + 1);
		int tmp = 0;
		// for (int i = 1; i <= n; i++) {
		// System.out.println(p[i].x + " " + p[i].pos);
		// }
		// ArrayList<Integer> answer = new ArrayList<Integer>();
		int[] answer = new int[n + 1];
		for (int i = 1; i <= n; i++) {
			if (tmp + 1 > p[i].x) {
				tmp = tmp + 1;
			} else {
				tmp = p[i].x;
			}
			answer[p[i].pos] = tmp;
		}
		for (int i = 1; i <= n; i++) {
			cout.println(answer[i]);
		}
		cout.flush();
	}

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

	public class FastIO {
		BufferedReader br;
		StringTokenizer st;
		PrintWriter out;

		public FastIO(InputStream in, OutputStream o) {
			br = new BufferedReader(new InputStreamReader(in));
			out = new PrintWriter(new OutputStreamWriter(o));
			eat("");
		}

		public FastIO() {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(new OutputStreamWriter(System.out));
			eat("");
		}

		public void eat(String s) {
			st = new StringTokenizer(s);
		}

		public String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				throw new IOError(e);
			}
		}

		public boolean hasNext() {
			while (!st.hasMoreTokens()) {
				String s = nextLine();
				if (s == null)
					return false;
				eat(s);
			}
			return true;
		}

		public String next() {
			hasNext();
			return st.nextToken();
		}

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

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

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

		public void print(String ans) {
			out.print(ans);
			out.flush();
		}

		public void println(String ans) {
			out.println(ans);
			out.flush();
		}

		public void close() {
			out.close();
		}
	}
}