#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int a[m], b[k], c[105] = {0};
  for (int i = 0; i < m; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < k; i++) {
    cin >> b[i];
  }
  for (int i = 0; i < m; i++) {
    c[a[i]] = 1;
  }
  for (int i = 0; i < k; i++) {
    if (c[b[i]] == 0) c[b[i]] = 2;
  }
  for (int i = 1; i <= n; i++) {
    cout << c[i] << " ";
  }
  return 0;
}
