#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  int arr[n + 1];
  for (int i = 0; i < a; i++) {
    int al;
    cin >> al;
    arr[al] = 1;
  }
  for (int i = 0; i < b; i++) {
    int al;
    cin >> al;
    arr[al] = 2;
  }
  for (int i = 1; i <= n; i++) cout << arr[i] << " ";
  cout << endl;
}
