#include <bits/stdc++.h>
using namespace std;
template <class T, class T2>
inline bool chkmax(T &x, const T2 &y) {
  return x < y ? x = y, 1 : 0;
}
template <class T, class T2>
inline bool chkmin(T &x, const T2 &y) {
  return x > y ? x = y, 1 : 0;
}
const long long mod = 1e9 + 7;
template <class T>
inline void fix(T &x) {
  if (x >= mod | x <= -mod) {
    x %= mod;
  }
  if (x < 0) {
    x += mod;
  }
}
const int MAX_N = 1e5 + 10;
struct Per {
  int ind, val, last;
  Per(int _x) {
    val = 0;
    last = -1;
    ind = _x;
  }
  Per() {}
  bool operator<(const Per &other) const {
    if (val == other.val) {
      return last > other.last;
    }
    return val < other.val;
  }
};
bool ok1[MAX_N], ok2[MAX_N];
Per per[MAX_N], cpy[MAX_N];
signed main() {
  int n, k, m, a;
  cin >> n >> k >> m >> a;
  for (int i = 0; i < n; i++) {
    per[i] = Per(i);
  }
  for (int i = 0; i < a; i++) {
    int x;
    cin >> x;
    x--;
    per[x].val++;
    per[x].last = i;
  }
  sort(per, per + n);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cpy[j] = per[j];
    }
    if (cpy[i].val == 0 || i < n - k) {
      ok1[cpy[i].ind] = true;
      continue;
    }
    int lft = m - a, ans = 0;
    for (int j = n - 1; j >= 0; j--) {
      if (j == i) {
        continue;
      }
      while (lft > 0 && cpy[j] < cpy[i]) {
        cpy[j].val++;
        cpy[j].last = mod;
        lft--;
      }
      if (cpy[i] < cpy[j]) {
        ans++;
      }
    }
    if (ans >= k) {
      ok1[cpy[i].ind] = true;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cpy[j] = per[j];
    }
    cpy[i].val += m - a;
    cpy[i].last = mod;
    int ans = 0;
    for (int j = 0; j < n; j++) {
      if (j == i) {
        continue;
      }
      if (cpy[i] < cpy[j]) {
        ans++;
      }
    }
    if (ans < k && cpy[i].val != 0) {
      ok2[cpy[i].ind] = true;
    }
  }
  for (int i = 0; i < n; i++) {
    if (ok1[i] && ok2[i]) {
      cout << 2 << " ";
    } else if (ok1[i]) {
      cout << 3 << " ";
    } else {
      cout << 1 << " ";
    }
  }
  return 0;
}
