#include <bits/stdc++.h>
using namespace std;
const int N = 111;
int app[N];
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 0; i < a; ++i) {
    int x;
    cin >> x;
    app[x] = 1;
  }
  for (int i = 0; i < b; ++i) {
    int x;
    cin >> x;
    app[x] = 2;
  }
  for (int i = 1; i <= n; ++i) cout << app[i] << ' ';
  cout << '\n';
  return 0;
}
