#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int a[n];
  vector<pair<int, int> > inp;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    inp.push_back(make_pair(a[i], i));
  }
  sort(inp.begin(), inp.end());
  int b[n];
  for (int i = 0; i < n; ++i) b[i] = 0;
  while (k--) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    if (a[x] > a[y])
      b[x]++;
    else if (a[y] > a[x])
      b[y]++;
  }
  vector<int> tmp;
  for (int i = 0; i < n; i++) tmp.push_back(inp[i].first);
  int res[n];
  for (int i = 0; i < n; ++i) {
    int ind = lower_bound(tmp.begin(), tmp.end(), a[i]) - tmp.begin();
    cout << ind - b[i] << " ";
  }
  cout << endl;
  return 0;
}
