#include <bits/stdc++.h>
using namespace std;
int arr1[102];
int arr2[102];
int f1[102] = {0};
int f2[102] = {0};
int main() {
  int t, i, j, n, ans, a, b;
  scanf("%d%d%d", &n, &a, &b);
  for (i = 0; i < a; i++) {
    scanf("%d", &arr1[i]);
    f1[arr1[i]]++;
  }
  for (i = 0; i < b; i++) {
    scanf("%d", &arr2[i]);
    f2[arr2[i]]++;
  }
  for (i = 1; i <= n; i++) {
    if (!f1[i])
      printf("2 ");
    else if (!f2[i])
      printf("1 ");
    else
      printf("1 ");
  }
  return 0;
}
