#include <bits/stdc++.h>
using namespace std;
int Set(int N, int pos) { return N = N | (1 << pos); }
int reset(int N, int pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
vector<int> vec, vec2[3000001];
int ar[3000001];
map<int, int> mpp;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int m, n, i, j, a, b, x, y, ck, t, r, ans, rem, cnt, lo, hi, sum, cs = 1;
  scanf("%d", &n), scanf("%d", &m);
  for (i = 1; i <= n; i++) {
    scanf("%d", &x);
    ar[i] = x;
    vec.push_back(x);
  }
  sort(vec.begin(), vec.end());
  for (i = 0; i < m; i++) {
    scanf("%d", &x), scanf("%d", &y);
    vec2[x].push_back(y);
    vec2[y].push_back(x);
    mpp[x] = y;
    mpp[y] = x;
  }
  for (i = 1; i <= n; i++) {
    x = ar[i];
    y = (lower_bound(vec.begin(), vec.end(), x) - vec.begin());
    for (j = 0; j < vec2[i].size(); j++) {
      a = vec2[i][j];
      if (ar[a] < x) y--;
    }
    cout << y << " ";
  }
  return 0;
}
