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