import java.util.*;
import java.io.*;

public class mtf_as_dumb implements Runnable {
    BufferedReader in;
    StringTokenizer st;

    public int nextInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return Integer.parseInt(st.nextToken());
    }


    public void solve() throws IOException {
        in = new BufferedReader(new FileReader("mtf.in"));
        PrintWriter out = new PrintWriter("mtf.out");

        int n = nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }

        int[] b = new int[n];
        int[] u = new int[n];
        int m = 0;
        for (int i = 0; i < n; i++) {
            int k = -1;
            for (int j = 0; j < m; j++) {
                if (u[j] == a[i]) {
                    k = j;
                    break;
                }
            }
            if (k == -1) {
                int gt = 0;
                for (int j = 0; j < m; j++) {
                    if (u[j] > a[i]) {
                        gt++;
                    }
                }
                b[i] = a[i] + gt;
                k = m;
                m++;
            } else {
                b[i] = k + 1;
            }

            for (int j = k; j > 0; j--) {
                u[j] = u[j - 1];
            }
            u[0] = a[i];
        }

        for (int i = 0; i < n; i++) {
            out.print(b[i]);
            if (i < n - 1) {
                out.print(" ");
            }
        }
        out.println();

        in.close();
        out.close();
    }

    public void run() {
        try {
            solve();
        } catch (IOException e) {
        }
    }

    public static void main(String[] arg) {
        new Thread(new mtf_as_dumb()).start();
    }
}