#include <bits/stdc++.h>
using namespace std;
const int inf = ~0U >> 1;
const long long INF = (long long)1e18;
const double pi = acos(-1.0);
template <class T>
inline T sqr(T a) {
  return a * a;
}
template <class T>
inline T min(T a, T b, T c) {
  return min(min(a, b), c);
}
template <class T>
inline T max(T a, T b, T c) {
  return max(max(a, b), c);
}
template <class T>
inline void read(T &n) {
  char c;
  for (c = getchar(); !(c >= '0' && c <= '9'); c = getchar())
    ;
  n = c - '0';
  for (c = getchar(); c >= '0' && c <= '9'; c = getchar()) n = n * 10 + c - '0';
}
int pw(int base, int n, int mo) {
  if (n == 0) return 1;
  if (n == 1) return base;
  int tmp = pw(base, n >> 1, mo);
  tmp = (long long)tmp * tmp % mo;
  if (n & 1) tmp = (long long)tmp * base % mo;
  return tmp;
}
int N, A, B, a[1000], c[1000], b[1000];
int main() {
  scanf("%d%d%d", &N, &A, &B);
  for (int i = (1); i <= (A); ++i) scanf("%d", &a[i]), c[a[i]] = 1;
  for (int i = (1); i <= (B); ++i) scanf("%d", &b[i]), c[b[i]] = 2;
  for (int i = (1); i <= (N); ++i) printf("%d ", c[i]);
  return 0;
}
