#include <bits/stdc++.h>
int f[1000];
int main() {
  memset(f, 0, sizeof(f));
  int n, a, b;
  int temp;
  scanf("%d%d%d", &n, &a, &b);
  for (int j = 0; j < a; j++) {
    scanf("%d", &temp);
    f[temp] = 1;
  }
  for (int j = 0; j < b; j++) {
    scanf("%d", &temp);
    f[temp] = 2;
  }
  for (int j = 1; j <= n; j++) printf("%d ", f[j]);
}
