#include <bits/stdc++.h>
const int MAX = 111;
using namespace std;
int A[MAX];
int main() {
  int N, a, b;
  scanf("%d%d%d", &N, &a, &b);
  for (int i = 0; i < (a); ++i) {
    int(x);
    scanf("%d", &x);
    A[x] = 1;
  }
  for (int i = 0; i < (b); ++i) {
    int(x);
    scanf("%d", &x);
    if (!A[x]) A[x] = 2;
  }
  for (int i = (1); i <= (N); ++i) printf("%d ", A[i]);
  return 0;
}
