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