#include <bits/stdc++.h>
using namespace std;
struct C {
  int id, num, last;
  bool operator<(const C& x) const {
    if (num != x.num) return num > x.num;
    return last < x.last;
  }
};
C c[100];
int ans[100];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, k, m, a, rem;
  cin >> n >> k >> m >> a;
  rem = m - a;
  for (int i = 0; i < n; i++) {
    c[i].id = i;
    c[i].num = c[i].last = 0;
  }
  for (int i = 0; i < a; i++) {
    int g;
    cin >> g;
    g--;
    c[g].num++;
    c[g].last = i;
  }
  if (k == n) {
    for (int i = 0; i < n; i++) {
      if (c[i].num >= 1)
        cout << 1 << " ";
      else if (rem >= 1)
        cout << 2 << " ";
      else
        cout << 3 << endl;
    }
    cout << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    vector<C> tmp(c, c + n);
    sort(tmp.begin(), tmp.end());
    int pos = -1;
    for (int j = 0; j < n; j++) {
      if (tmp[j].id == i) pos = j;
    }
    if (tmp[pos].num >= 1 && pos <= k - 1) {
      int down = 0, r = rem;
      for (int j = pos + 1; j < n; j++) {
        int need = tmp[pos].num + 1 - tmp[j].num;
        if (r >= need) {
          r -= need;
          down++;
        }
      }
      pos += down;
      if (pos <= k - 1)
        ans[i] = 1;
      else
        ans[i] = 2;
      continue;
    }
    tmp[pos].num += rem;
    tmp[pos].last = m - 1;
    sort(tmp.begin(), tmp.end());
    pos = -1;
    for (int j = 0; j < n; j++) {
      if (tmp[j].id == i) pos = j;
    }
    if (tmp[pos].num >= 1 && pos <= k - 1)
      ans[i] = 2;
    else
      ans[i] = 3;
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
