#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, a, b, i, x, y, k[100] = {0};
  cin >> n >> a >> b;
  for (i = 1; i <= a; i++) {
    cin >> x;
    k[x] = 1;
  }
  for (i = 1; i <= b; i++) {
    cin >> y;
    if (k[y] != 1) k[y] = 2;
  }
  for (i = 1; i <= n; i++) cout << k[i] << " ";
  return 0;
}
