#include <bits/stdc++.h>
using namespace std;
long long a[1000016], b[1000016], ans[1000016];
vector<long long> v;
vector<long long>::iterator it;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, k, i;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    v.push_back(a[i]);
  }
  sort(v.begin(), v.end());
  for (i = 0; i < k; i++) {
    long long x, y;
    cin >> x >> y;
    x--;
    y--;
    if (a[x] < a[y])
      ans[y]--;
    else if (a[x] > a[y])
      ans[x]--;
  }
  for (i = 0; i < n; i++) {
    it = lower_bound(v.begin(), v.end(), a[i]);
    ans[i] = it - v.begin() + ans[i];
    cout << ans[i] << " ";
  }
  return 0;
}
