#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, n, p, q, nn, a[1001];
  while (cin >> n) {
    memset(a, 0, sizeof(a));
    cin >> p >> q;
    for (i = 1; i <= p; i++) {
      cin >> k;
      a[k] = 1;
    }
    for (i = 1; i <= q; i++) {
      cin >> k;
      if (a[k] == 0) {
        a[k] = 2;
      }
    }
    for (i = 1; i <= n; i++) {
      cout << a[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
