#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, a, b, i, x;
  cin >> n >> a >> b;
  int p[n], q[n];
  p[n] = {0};
  q[n] = {0};
  for (i = 0; i < a; i++) {
    cin >> x;
    p[x - 1] = 1;
    q[x - 1] = -1;
  }
  for (i = 0; i < b; i++) {
    cin >> x;
    q[x - 1] = 1;
    p[x - 1] = -1;
  }
  for (i = 0; i < n; i++) {
    if (p[i] == 1)
      cout << 1 << " ";
    else
      cout << 2 << " ";
  }
}
