#include <bits/stdc++.h>
using namespace std;
struct Node {
  int skills, num;
} a[200005], b[200005];
bool cmp(Node x, Node y) {
  if (x.skills != y.skills)
    return x.skills < y.skills;
  else
    return x.num < y.num;
}
int dir[200005];
int main() {
  int n, k, x, y, i, j;
  int t, first, last, mid, ans;
  memset(dir, 0, sizeof(dir));
  scanf("%d%d", &n, &k);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i].skills);
    a[i].num = i;
    b[i] = a[i];
  }
  for (i = 0; i < k; i++) {
    scanf("%d%d", &x, &y);
    x--;
    y--;
    if (a[x].skills < a[y].skills)
      dir[y]++;
    else if (a[x].skills > a[y].skills)
      dir[x]++;
  }
  sort(b, b + n, cmp);
  for (i = 0; i < n; i++) {
    t = a[i].skills;
    first = 0;
    last = n - 1;
    mid = 0;
    while (first <= last) {
      mid = (first + last) / 2;
      if (b[mid].skills < t)
        first = mid + 1;
      else if (b[mid].skills >= t)
        last = mid - 1;
    }
    ans = (last + 1) - dir[a[i].num];
    printf("%d ", ans);
  }
  return 0;
}
