#include<bits/stdc++.h>

#pragma GCC optimize("O2")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")

#define pii pair<int,int>
#define ii int,int
#define fi first
#define se second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define umap unordered_map
#define BIT(mask, i) ((mask >> i)&1)
#define ALL(c) c.begin(), c.end()

using namespace std;

mt19937 rd(chrono::high_resolution_clock::now().time_since_epoch().count());
int rand(int l, int r){
    return  l + rd()*rd()%(r-l+1);
}

const int N = 1e6+7;
const int M = 1e3+3;
const int MOD = 1e9+7;
const int inf = 3e18;

long long n, a[100005];

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin >> n;
    map<long long, int> mp;
    // coi "key" chính là phần tử của mảng và "value" là thứ hạng của phần tử
    // mình cho tất cả các phần tử vào map -> Đã được sắp xếp và loại bỏ những cái key trùng lặp
    for(int i = 1; i <= n; i++){
        cin >> a[i];
        mp[a[i]] = 1;
    }
    // mp đang chứa mảng a được sắp xếp tăng dần
    int thuhang = 1;

    for(map<long long, int>::iterator it = mp.begin(); it != mp.end(); it++){
        // mp.begin() -> bắt đầu của map
        // mp.end() -> kết thúc của map
        // sử dụng pointer để duyệt
        // Không dùng <= mà dùng !=
        it -> second = thuhang;
        thuhang++;
    }
    // -> mp[a[i]] chính là thứ hạng của a[i];
    for(int i = 1; i <= n; i++){
        cout << mp[a[i]] << ' ';
    }
}
//1 3 6 8 9 | 3 8 6 9 1
//1 2 3 4 5 | 2 4 3 5 1
