#include <bits/stdc++.h>
using namespace std;
const int INF = (int)2e9;
const double EPS = (double)1e-9;
const double PI = (double)acos(-1.0);
const long long MOD = (long long)1e9 + 7;
void base() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
long long n, k, arr[200005], ans[200005];
vector<int> skill;
vector<int> g[200005], v;
bool vis[200005];
set<int> st;
string str, str2;
bool flag = false;
void dfs(int from) {
  v.push_back(from);
  vis[from] = true;
  for (int i = 0; i < g[from].size(); i++) {
    int to = g[from][i];
    if (vis[to]) continue;
    dfs(to);
  }
}
int main() {
  int m;
  cin >> n >> m;
  for (int i = 1; i < n + 1; i++) {
    cin >> arr[i];
    skill.push_back(arr[i]);
  }
  sort(skill.begin(), skill.end());
  for (int i = 1; i < n + 1; i++) {
    ans[i] = lower_bound(skill.begin(), skill.end(), arr[i]) - skill.begin();
  }
  while (m--) {
    int a, b;
    cin >> a >> b;
    if (arr[a] > arr[b]) {
      ans[a]--;
    }
    if (arr[b] > arr[a]) {
      ans[b]--;
    }
  }
  for (int i = 1; i < n + 1; i++) {
    if (i != 1) cout << " ";
    cout << ans[i];
  }
  return 0;
}
