#include <bits/stdc++.h>
template <class T>
bool MX(T &l, const T &r) {
  return l < r ? l = r, 1 : 0;
}
template <class T>
bool MN(T &l, const T &r) {
  return l > r ? l = r, 1 : 0;
}
using namespace std;
const long long MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k, a, b, bef = 0, l = 0, lc = 0;
  cin >> n >> k;
  vector<pair<int, int> > r(n), m(n);
  vector<vector<int> > q(n);
  vector<int> s(n);
  for (int i = 0; i < (int)n; ++i) {
    cin >> s[i];
    r[i] = make_pair(s[i], i);
  }
  for (int i = 0; i < (int)k; ++i) {
    cin >> a >> b;
    q[--a].push_back(--b);
    q[b].push_back(a);
  }
  sort(r.begin(), r.end());
  for (int i = 0; i < (int)n; ++i) {
    if (l != r[i].first) {
      bef += lc;
      l = r[i].first;
      lc = 1;
    } else {
      ++lc;
    }
    m[i] = make_pair(r[i].second, bef);
    for (int u : q[r[i].second])
      if (s[u] < r[i].first) --m[i].second;
  }
  sort(m.begin(), m.end());
  for (int i = 0; i < (int)n; ++i) cout << m[i].second << " ";
  cout << endl;
  return 0;
}
