#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return a % b == 0 ? b : gcd(b, a % b); }
int used[300];
typedef struct node {
  int wanted[300];
} Node;
Node ar, al;
int main() {
  int N, a, b;
  int ll;
  memset(used, 0, sizeof(used));
  scanf("%d%d%d", &N, &a, &b);
  for (int i = 0; i < a; i++) {
    scanf("%d", &ll);
    if (used[ll] == 0) used[ll] = 1;
  }
  for (int i = 0; i < b; i++) {
    scanf("%d", &ll);
    if (used[ll] == 0) used[ll] = 2;
  }
  for (int i = 1; i <= N; i++) printf("%d ", used[i]);
  putchar('\n');
  return 0;
}
