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