#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 1;
  while (t--) {
    int n, a, b, i, j;
    cin >> n >> a >> b;
    int arr1[a];
    int arr2[b];
    for (i = 0; i < a; i++) {
      cin >> arr1[i];
    }
    int cnt = 0;
    for (i = 0; i < b; i++) {
      cin >> arr2[i];
    }
    for (i = 1; i <= n; i++) {
      cnt = 0;
      for (int ii = 0; ii < a; ii++) {
        if (i == arr1[ii]) {
          cnt++;
          cout << 1 << " ";
        }
      }
      if (cnt == 0) {
        cout << 2 << " ";
      }
    }
  }
}
