#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  vector<int> V(n);
  for (int i = 0; i < a; ++i) {
    int k;
    cin >> k;
    V[k - 1]++;
  }
  for (int i = 0; i < b; ++i) {
    int k;
    cin >> k;
    V[k - 1] += 2;
  }
  for (int i = 0; i < n; ++i) {
    if (V[i] >= 2)
      cout << "2 ";
    else
      cout << "1 ";
  }
  cout << "\n";
  return 0;
}
