#include <bits/stdc++.h>
using namespace std;
int app[105], a1[105], a2[105];
int main() {
  int n, a, b, k;
  while (cin >> n >> a >> b) {
    int i, j;
    memset(app, 0, sizeof(app));
    for (i = 0; i < a; i++) cin >> a1[i];
    for (i = 0; i < b; i++) cin >> a2[i];
    for (i = 0; i < a; i++) app[a1[i] - 1] = 1;
    for (i = 0; i < n; i++) {
      if (app[i])
        cout << app[i];
      else
        cout << app[i] + 2;
      if (i != n - 1)
        cout << " ";
      else
        cout << endl;
    }
  }
  return 0;
}
