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