#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a, b;
  cin >> a >> b;
  vector<int> d(a), c(b);
  for (int i = 0; i < a; i++) {
    cin >> d[i];
  }
  for (int i = 0; i < b; i++) {
    cin >> c[i];
  }
  int k = 1;
  for (int i = 0; i < n; i++) {
    int h1 = 0, h2 = 0;
    for (int j = 0; j < a; j++) {
      if (d[j] == k) h1++;
    }
    for (int j = 0; j < b; j++) {
      if (c[j] == k) h2++;
    }
    if (h1 > 0) {
      cout << "1 ";
    } else
      cout << "2 ";
    k++;
  }
}
