#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[110];
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 0; i <= 105; i++) arr[i] = 0;
  for (int i = 0; i < a; i++) {
    int t;
    scanf("%d", &t);
    arr[t] = 1;
  }
  for (int i = 0; i < b; i++) {
    int t;
    scanf("%d", &t);
    if (arr[t] != 1) arr[t] = 2;
  }
  for (int i = 1; i <= n; i++) cout << arr[i] << " ";
  cout << endl;
  return 0;
}
