#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n, a, b;
  int lis[110];
  cin >> n >> a >> b;
  for (int i = 0; i < a; ++i) {
    int na;
    cin >> na;
    lis[na] = 1;
  }
  for (int i = 0; i < b; ++i) {
    int nb;
    cin >> nb;
    lis[nb] = 2;
  }
  for (int i = 1; i < n + 1; ++i) {
    if (i != 1) cout << " ";
    cout << lis[i];
  }
  return 0;
}
