#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t = 1;
  while (t--) {
    long long n, a, b;
    cin >> n >> a >> b;
    map<int, int> us;
    for (long long i = 0; i < a; i++) {
      int d;
      cin >> d;
      us[d] = 1;
    }
    for (long long i = 0; i < b; i++) {
      int d;
      cin >> d;
      us[d] = 2;
    }
    for (long long i = 1; i <= n; i++) {
      cout << us[i] << " ";
    }
  }
  return 0;
}
