#include <bits/stdc++.h>
using namespace std;
int c[120];
int n, a, b;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> a >> b;
  for (int i = 0; i < a; i++) {
    int t;
    cin >> t;
    c[t] = 1;
  }
  for (int i = 0; i < b; i++) {
    int t;
    cin >> t;
    c[t] = 2;
  }
  for (int i = 1; i <= n; i++) cout << c[i] << " ";
  cout << endl;
  return 0;
}
