#include <bits/stdc++.h>
using namespace std;
void _fill_int(int* p, int val, int rep) {
  int i;
  for (i = 0; i < rep; i++) p[i] = val;
}
signed long long GETi() {
  signed long long i;
  scanf("%lld", &i);
  return i;
}
int N, A, B;
int ok[101];
void solve() {
  int f, i, j, k, l, x, y;
  cin >> N >> A >> B;
  for (i = 0; i < A; i++) cin >> x, ok[x] = 1;
  for (i = 0; i < N; i++) (void)printf("%d ", 2 - ok[i + 1]);
  (void)printf("\n");
}
int main(int argc, char** argv) {
  string s;
  if (argc == 1) ios::sync_with_stdio(false);
  for (int i = 1; i < argc; i++) s += argv[i], s += '\n';
  for (int i = s.size() - 1; i >= 0; i--) ungetc(s[i], stdin);
  solve();
  return 0;
}
