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