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