#include <bits/stdc++.h>
using namespace std;
void CF() {
  int t;
  cin >> t;
  while (t--) {
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  int Aa[a], Bb[b];
  for (int i = 0; i < (a); ++i) cin >> Aa[i];
  for (int i = 0; i < (b); ++i) cin >> Bb[i];
  int Nn[n];
  for (int i = 0; i < (n); ++i) Nn[i] = 0;
  for (int i = 0; i < (a); ++i) {
    Nn[Aa[i] - 1] = 1;
  }
  for (int i = 0; i < (b); ++i) {
    if (Nn[Bb[i] - 1] == 0) {
      Nn[Bb[i] - 1] = 2;
    }
  }
  for (int i = 0; i < (n); ++i) cout << Nn[i] << " ";
  return 0;
}
