#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  int largest = 0;
  int ar = 1;
  int al = 2;
  int arr1[101] = {0};
  int arr2[101] = {0};
  int z;
  cin >> n >> a >> b;
  for (int i = 1; i <= a; i++) {
    cin >> z;
    largest = max(largest, z);
    arr1[z] += 1;
  }
  for (int i = 1; i <= b; i++) {
    cin >> z;
    largest = max(largest, z);
    arr2[z] += 1;
  }
  for (int i = 1; i <= largest; i++) {
    if (arr1[i] == 1 || (arr1[i] + arr2[i]) == 2)
      cout << ar << " ";
    else if (arr2[i] == 1 && (arr1[i] + arr2[i]) != 2)
      cout << al << " ";
  }
  cout << endl;
  return 0;
}
