#include <bits/stdc++.h>
using namespace std;
int freq[100001];
int main() {
  int n, ar, al, l, c = 0;
  cin >> n >> ar >> al;
  for (int i = 0; i < ar; ++i) {
    cin >> l;
    freq[l] = 1;
    ++c;
  }
  for (int i = 0; i < al; ++i) {
    cin >> l;
    if (freq[l] != 1) {
      ++c;
      freq[l] = 2;
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (freq[i] == 0) {
      cout << '2' << " ";
    } else {
      cout << freq[i] << " ";
    }
  }
  return 0;
}
