#include <bits/stdc++.h>
using namespace std;
unsigned int v[100];
int main() {
  unsigned int n, a, b;
  cin >> n >> a >> b;
  for (unsigned int i = 0; i < a; ++i) {
    unsigned int c;
    cin >> c;
    v[c - 1] = 1;
  }
  for (unsigned int i = 0; i < b; ++i) {
    unsigned int c;
    cin >> c;
    if (v[c - 1] == 0) v[c - 1] = 2;
  }
  cout << v[0];
  for (unsigned int i = 1; i < n; ++i) cout << ' ' << v[i];
  cout << endl;
  return 0;
}
