#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  vector<int> v1;
  vector<int> v2;
  for (int i = 0; i < a; i++) {
    int x;
    cin >> x;
    v1.push_back(x);
  }
  for (int i = 0; i < b; i++) {
    int y;
    cin >> y;
    v2.push_back(y);
  }
  for (int i = 1; i <= n; i++) {
    if (count(v1.begin(), v1.end(), i))
      cout << "1 ";
    else
      cout << "2 ";
  }
}
