#include <bits/stdc++.h>
using namespace std;
struct papi {
  int nr;
  int pozi;
  int fr;
} v[101];
int compare(papi a, papi b) {
  if (a.fr != b.fr) {
    return a.fr > b.fr;
  } else {
    return a.pozi < b.pozi;
  }
}
int n, k, vt, vf, x, i, j, poz, ok1, xx;
int main() {
  cin >> n >> k >> vt >> vf;
  for (i = 1; i <= n; i++) {
    v[i].nr = i;
  }
  for (i = 1; i <= vf; i++) {
    cin >> x;
    v[x].fr++;
    v[x].pozi = i;
  }
  xx = vt - vf;
  sort(v + 1, v + n + 1, compare);
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      if (v[j].nr == i) {
        poz = j;
        break;
      }
    }
    if (poz <= k) {
      if (v[poz].fr == 0 && xx == 0) {
        cout << "3"
             << " ";
      } else {
        ok1 = 0;
        x = xx;
        for (j = poz + 1; j <= min(poz + k - poz + 1, n); j++) {
          x = x - (v[poz].fr - v[j].fr + 1);
          if (x < 0) {
            ok1 = 1;
            break;
          }
        }
        if (v[poz].fr == 0) {
          cout << "2"
               << " ";
        } else if (k == n) {
          cout << "1"
               << " ";
        } else if (ok1 == 1) {
          cout << "1"
               << " ";
        } else {
          cout << "2"
               << " ";
        }
      }
    } else {
      if (v[poz].fr == 0 && xx == 0) {
        cout << "3"
             << " ";
      } else {
        if (v[k].fr - v[poz].fr + 1 <= xx) {
          cout << "2"
               << " ";
        } else {
          cout << "3"
               << " ";
        }
      }
    }
  }
  return 0;
}
