#include <bits/stdc++.h>
using namespace std;
const int oo = 110;
int n, x, y, a[oo], b[oo], c[oo], d[oo];
int main() {
  cin >> n >> x >> y;
  for (int i = 0; i < x; i++) cin >> a[i], c[a[i]]++, d[a[i]] = 1;
  for (int i = 0; i < y; i++) {
    cin >> b[i];
    if (!c[b[i]]) d[b[i]] = 2;
  }
  for (int i = 1; i <= n; i++) cout << d[i] << ' ';
  return 0;
}
