#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2e6 + 10, inf = 1e18, mod = 1e9 + 7;
long long n, a, b, ans[MAXN];
void Read_input() {
  cin >> n >> a >> b;
  long long tmp;
  for (long long i = 1; i <= a; i++) {
    cin >> tmp;
    if (!ans[tmp]) ans[tmp] = 1;
  }
  for (long long i = 1; i <= b; i++) {
    cin >> tmp;
    if (!ans[tmp]) ans[tmp] = 2;
  }
}
void Solve() {
  for (long long i = 1; i <= n; i++) cout << ans[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  Read_input(), Solve();
  return 0;
}
