#include #include #include #include #include #include using namespace std; using ll = long long; void solve(); int main() { solve(); #ifdef DBG while (true); #endif } //504 void solve() { int n, a[100000]; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", a + i); int rank = 1; for (int i = 1; i < n; i++) { if (a[0] < a[i]) rank++; printf("%d\n", rank); } }