#include <bits/stdc++.h>
using namespace std;
inline void OPEN(const string &s) {
  freopen((s + ".in").c_str(), "r", stdin);
  freopen((s + ".out").c_str(), "w", stdout);
}
int main() {
  int n;
  scanf("%d", &n);
  int art;
  scanf("%d", &art);
  int alex;
  scanf("%d", &alex);
  int ans[110] = {0};
  for (int i = 0; i < art; i++) {
    int temp;
    scanf("%d", &temp);
    if (ans[temp] == 0) ans[temp] = 1;
  }
  for (int i = 0; i < alex; i++) {
    int temp;
    scanf("%d", &temp);
    if (ans[temp] == 0) ans[temp] = 2;
  }
  for (int i = 1; i < n + 1; i++) {
    if (ans[i] == 0)
      printf("1 ");
    else
      printf("%d ", ans[i]);
  }
}
