#include <bits/stdc++.h>
using namespace std;
const int Max = 1e9 + 100;
const long long int MAX = 1e18 + 500;
const int sz = 2e5 + 100;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int a, b, c, i, j, k, q, p, x, y, ct, ct1, m, l, r, x1, y1, mn, h, sum1, in,
      z, mid, n, mx;
  char ch;
  double d;
  string str1, str2, str;
  bool bl, bl1;
  int t, cs = 1;
  cin >> n >> m;
  int ara[n + 1];
  vector<int> test;
  for (int i = 1; i <= n; i++) {
    cin >> ara[i];
    test.push_back(ara[i]);
  }
  sort(test.begin(), test.end());
  int ans[n + 1];
  for (int i = 1; i <= n; i++) {
    int pos = (lower_bound(test.begin(), test.end(), ara[i])) - test.begin();
    ans[i] = pos;
  }
  while (m--) {
    cin >> a >> b;
    if (ara[a] > ara[b])
      --ans[a];
    else if (ara[a] < ara[b])
      --ans[b];
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << '\n';
}
