#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m1, m2, c;
  cin >> n >> m1 >> m2;
  int x[n], v1[m1], v2[m2], z[n];
  for (int i = 0; i < n; i++) z[i] = x[i] = i + 1;
  for (int i = 0; i < m1; i++) {
    cin >> v1[i];
    for (int j = 0; j < n; j++)
      if (v1[i] == x[j]) x[j] = 1;
    continue;
  }
  for (int i = 0; i < m2; i++) cin >> v2[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m2; j++) {
      if (z[i] == v2[j]) x[i] = 2;
    }
  }
  for (int i = 0; i < n; i++) cout << x[i] << " ";
  return 0;
}
