#include <bits/stdc++.h>
using namespace std;
int dr[] = {-1, 0, 1, 0, -1, 1, 1, -1};
int dc[] = {0, 1, 0, -1, 1, 1, -1, -1};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, a, b;
  while (cin >> n >> a >> b) {
    map<int, bool> aa, bb;
    for (int i = 0; i < a; i++) {
      int nn;
      cin >> nn;
      aa[nn] = 1;
    }
    for (int i = 0; i < b; i++) {
      int nn;
      cin >> nn;
      bb[nn] = 1;
    }
    for (int i = 1; i <= n; i++) {
      if (i > 1) cout << " ";
      if (aa[i])
        cout << "1";
      else
        cout << "2";
    }
    cout << endl;
  }
  return 0;
}
