#include <bits/stdc++.h>
using namespace std;
struct record {
  int r;
  int no;
  int cnt;
};
int n, k;
record rec[200005];
int ans[200005];
inline bool operator<(const record &a, const record &b) { return a.r < b.r; }
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) rec[i].no = i;
  for (int i = 1; i <= n; i++) rec[i].cnt = 0;
  for (int i = 1; i <= n; i++) cin >> rec[i].r;
  int a, b;
  while (k--) {
    cin >> a >> b;
    if (rec[a].r < rec[b].r) rec[b].cnt++;
    if (rec[b].r < rec[a].r) rec[a].cnt++;
  }
  sort(rec + 1, rec + n + 1);
  for (int i = 1; i <= n; i++)
    ans[rec[i].no] =
        distance(rec + 1, lower_bound(rec + 1, rec + n + 1, rec[i])) -
        rec[i].cnt;
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
