#include <bits/stdc++.h>
using namespace std;
struct re {
  int cnt, tim, id;
} d[210];
int n, k, m, a, ans[210], q[210];
bool cmp(re x, re y) {
  return x.cnt != y.cnt ? (x.cnt > y.cnt) : (x.tim <= y.tim);
}
int main() {
  int i, j, t, sum, x;
  scanf("%d%d%d%d", &n, &k, &m, &a);
  for (i = 1; i <= n; i++) ans[i] = d[i].cnt = d[i].tim = 0, d[i].id = i;
  for (i = 1; i <= a; i++) {
    scanf("%d", &x);
    d[x].cnt++;
    d[x].tim = i;
  }
  for (i = 1; i <= n; i++) {
    d[i].cnt += m - a;
    t = d[i].tim;
    if (m != a) d[i].tim = m;
    sum = 0;
    for (j = 1; j <= n; j++)
      if (i != j && cmp(d[j], d[i])) sum++;
    if (sum < k && d[i].cnt)
      ans[i] += 0;
    else
      ans[i] += 1;
    d[i].cnt -= m - a;
    d[i].tim = t;
  }
  for (i = 1; i <= n; i++) {
    q[0] = 0;
    for (j = 1; j <= n; j++)
      if (i != j) {
        if (cmp(d[j], d[i]))
          t = 0;
        else
          t = d[i].cnt + 1 - d[j].cnt;
        q[++q[0]] = t;
      }
    q[++q[0]] = 10000007;
    sort(q + 1, q + q[0] + 1);
    sum = 0;
    for (j = 1; j <= k; j++) sum += q[j];
    if (sum <= m - a || !d[i].cnt)
      ans[i] += 2;
    else
      ans[i] += 1;
  }
  for (i = 1; i < n; i++) printf("%d ", ans[i]);
  printf("%d\n", ans[n]);
  return 0;
}
