#include <bits/stdc++.h>
using namespace std;
int n, a, b;
set<int> arth, ol;
int main() {
  cin >> n >> a >> b;
  for (int i = 0; i < a; i++) {
    int p;
    cin >> p;
    arth.insert(p);
  }
  for (int i = 0; i < b; i++) {
    int p;
    cin >> p;
    ol.insert(p);
  }
  for (int i = 1; i < n + 1; i++) {
    if (arth.find(i) != arth.end() && ol.find(i) == ol.end())
      cout << "1 ";
    else
      cout << "2 ";
  }
  cout << endl;
  return 0;
}
