#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, tmp;
  cin >> n >> a >> b;
  int ans[n];
  for (int i = 0; i < n; i++) {
    ans[i] = 0;
  }
  for (int i = 0; i < a; i++) {
    cin >> tmp;
    ans[tmp - 1] = 1;
  }
  for (int i = 0; i < b; i++) {
    cin >> tmp;
    ans[tmp - 1] = 2;
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
