#include <bits/stdc++.h>
int main() {
  int n, a, b, num1[105], num2[105], ans[105];
  while (scanf("%d%d%d", &n, &a, &b) != EOF) {
    memset(ans, 0, sizeof(ans));
    for (int i = 0; i < a; i++) scanf("%d", &num1[i]);
    for (int i = 0; i < b; i++) {
      scanf("%d", &num2[i]);
    }
    for (int i = 0; i < a; i++) {
      ans[num1[i]] = 1;
    }
    for (int i = 0; i < b; i++) {
      if (ans[num2[i]] == 1) continue;
      ans[num2[i]] = 2;
    }
    for (int i = 1; i <= n; i++) {
      printf(i == 1 ? "%d" : " %d", ans[i]);
    }
    printf("\n");
  }
  return 0;
}
