#include <bits/stdc++.h>
using namespace std;
int mp[222];
int main() {
  int n, a, b;
  while (cin >> n >> a >> b) {
    int p;
    for (int i = 0; i < a; i++) {
      scanf("%d", &p);
      mp[p] = 1;
    }
    for (int i = 0; i < b; i++) {
      scanf("%d", &p);
      if (mp[p] == 0) mp[p] = 2;
    }
    for (int i = 1; i <= n - 1; i++) printf("%d ", mp[i]);
    printf("%d\n", mp[n]);
    memset(mp, 0, sizeof(mp));
  }
}
