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