#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  vector<int> record(n + 1);
  for (int i = 0; i < a; ++i) {
    int temp1;
    cin >> temp1;
    record[temp1] = 1;
  }
  for (int i = 0; i < b; ++i) {
    int temp2;
    cin >> temp2;
    record[temp2] = 2;
  }
  for (int i = 1; i <= n; ++i) {
    if (i != n) {
      cout << record[i] << " ";
    } else {
      cout << record[i] << endl;
    }
  }
  return 0;
}
