#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  vector<vector<int> > adj(n);
  vector<int> r(n), b(n);
  for (int i = 0; i < n; i++) {
    cin >> r[i];
    b[i] = r[i];
  }
  sort(b.begin(), b.end());
  for (int i = 0; i < k; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 0; i < n; i++) {
    int x = lower_bound(b.begin(), b.end(), r[i]) - b.begin();
    for (auto it : adj[i]) {
      if (r[it] < r[i]) x--;
    }
    cout << x << " ";
  }
  cout << endl;
  return 0;
}
