#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, w, j, p, q;
  cin >> n >> w;
  long long a[n], b[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(b, b + n);
  int c[n];
  memset(c, 0, sizeof(c));
  for (int i = 0; i < n; i++) {
    j = lower_bound(b, b + n, a[i]) - b - 1;
    c[i] = j;
  }
  while (w--) {
    cin >> p >> q;
    p--;
    q--;
    if (a[p] > a[q]) {
      c[p]--;
    } else if (a[p] < a[q])
      c[q]--;
  }
  for (int i = 0; i < n; i++) {
    cout << c[i] + 1 << " ";
  }
  return 0;
}
