#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, a, b, tmp;
  cin >> n >> a >> b;
  set<int> A, B;
  for (int i = 0; i < a; ++i) {
    cin >> tmp;
    --tmp;
    A.insert(tmp);
  }
  for (int i = 0; i < b; ++i) {
    cin >> tmp;
    --tmp;
    B.insert(tmp);
  }
  for (int i = 0; i < n; ++i) {
    if (A.count(i))
      cout << "1 ";
    else
      cout << "2 ";
  }
  return 0;
}
