#include <bits/stdc++.h>
using namespace std;
int n = 0, a = 0, b = 0, z = 0;
int main() {
  cin >> n >> a >> b;
  int artur[n];
  for (int i = 0; i < a; i++) {
    cin >> z;
    artur[z - 1] = 1;
  }
  for (int j = 0; j < b; j++) {
    cin >> z;
    artur[z - 1] = 2;
  }
  for (int k = 0; k < n; k++) {
    cout << artur[k] << " ";
  }
  return 0;
}
