#include <bits/stdc++.h>
using namespace std;
const int N = 120;
int vis[N];
int main() {
  int n, a, b;
  while (cin >> n >> a >> b) {
    int x;
    memset(vis, 0, sizeof(vis));
    for (int i = 1; i <= a; i++) {
      cin >> x;
      vis[x] = 1;
    }
    for (int i = 1; i <= b; i++) {
      cin >> x;
      if (!vis[x]) vis[x] = 2;
    }
    for (int i = 1; i <= n; i++) {
      if (vis[i] == 1) cout << 1 << " ";
      if (vis[i] == 2) cout << 2 << " ";
    }
    puts("");
  }
  return 0;
}
