#include <bits/stdc++.h>
int n, a, b, res[100000], t;
using namespace std;
int main() {
  cin >> n >> a >> b;
  for (int i = 1; i <= a; i++) {
    cin >> t;
    res[t] = 1;
  }
  for (int i = 1; i <= b; i++) {
    cin >> t;
    if (res[t] != 1) res[t] = 2;
  }
  for (int i = 1; i <= n; i++) {
    cout << res[i] << ' ';
  }
  return 0;
}
