#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, arthur, alex, i, j, k;
  cin >> n >> arthur >> alex;
  int a[110], b[110];
  memset(a, 0, sizeof a);
  for (i = 0; i < arthur; i++) {
    cin >> j;
    a[j] = 1;
  }
  for (i = 0; i < alex; i++) {
    cin >> j;
    a[j] = 2;
  }
  for (i = 1; i <= n; i++) {
    cout << a[i] << " ";
  }
  return 0;
}
