public void solve() throws IOException {
    int n = nextInt();
    int[] arr = new int[n];
    for (int x = 0; x < n; x++) {
      arr[x] = nextInt();
    }
    StringBuffer buf = new StringBuffer();
    for (int x = 0; x < n; x++) {
      int count = 0;
      for (int y = 0; y < n; y++) {
        if (arr[y] > arr[x]) {
          count++;
        }
      }
      buf.append(count + 1);
      buf.append(" ");
    }
    System.out.println(buf.toString().trim());
  }