#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a;
  int b;
  cin >> a >> b;
  map<int, int> qwe;
  for (int i = 0; i < a; i++) {
    int num;
    cin >> num;
    qwe[num] = 1;
  }
  for (int i = 0; i < b; i++) {
    int num;
    cin >> num;
    qwe[num] = 2;
  }
  for (int i = 1; i <= n; i++) {
    if (qwe[i] == 0)
      cout << 1 << ' ';
    else
      cout << qwe[i] << ' ';
  }
}
