#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int main() {
  long long n, a, b;
  cin >> n >> a >> b;
  long long A[a], B[b], arr[n];
  for (long long i = 0; i < a; i++) {
    cin >> A[i];
    arr[A[i] - 1] = 1;
  }
  for (long long i = 0; i < b; i++) {
    cin >> B[i];
    arr[B[i] - 1] = 2;
  }
  for (long long i = 0; i < n; i++) cout << arr[i] << " ";
  cout << "\n";
}
