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