#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 2e5 + 4;
int main() {
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  int val[n + 1], orig[n + 1];
  vector<int> v[N];
  for (int i = 1; i < n + 1; i++) {
    scanf("%d", &val[i]);
    orig[i] = val[i];
  }
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d", &a);
    scanf("%d", &b);
    v[a].push_back(val[b]);
    v[b].push_back(val[a]);
  }
  sort(val + 1, val + n + 1);
  for (int i = 1; i < n + 1; i++) sort(v[i].begin(), v[i].end());
  for (int i = 1; i < n + 1; i++) {
    int here = lower_bound(val + 1, val + n + 1, orig[i]) - (val + 1);
    int now = lower_bound(v[i].begin(), v[i].end(), orig[i]) - v[i].begin();
    here -= now;
    cout << here << " ";
  }
  return 0;
}
