#include <bits/stdc++.h>
using namespace std;
int n, a, b;
int apple[100];
int main() {
  while (~scanf("%d%d%d", &n, &a, &b)) {
    for (int i = 0; i < n; i++) apple[i] = 0;
    for (int i = 0; i < a; i++) {
      int k;
      scanf("%d", &k);
      apple[k - 1] = 1;
    }
    for (int i = 0; i < b; i++) {
      int k;
      scanf("%d", &k);
      apple[k - 1] = 2;
    }
    for (int i = 0; i < n; i++) {
      if (i == 0 && apple[i] != 0)
        printf("%d", apple[i]);
      else if (apple[i] != 0)
        printf(" %d", apple[i]);
    }
    printf("\n");
  }
  return 0;
}
