#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, x;
  cin >> n >> a >> b;
  int arr[n + a];
  memset(arr, 0, sizeof arr);
  while (a--) {
    cin >> x;
    arr[x] = 1;
  }
  while (b--) {
    cin >> x;
    if (arr[x] == 0) arr[x] = 2;
  }
  for (int i = 1; i <= n; i++) cout << arr[i] << " ";
  cout << "\n";
  return 0;
}
