#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
int main() {
  vector<int> v, v1;
  long long a, b, c, d, e;
  cin >> a >> b >> c;
  for (int i = 0; i < b; i++) {
    cin >> d;
    v.push_back(d);
  }
  for (int i = 0; i < c; i++) {
    cin >> e;
    v1.push_back(e);
  }
  for (int i = 1; i <= a; i++) {
    long long n = 0;
    for (int j = 0; j < v.size(); j++) {
      if (mp[v[j]] != 5 and i == v[j]) {
        cout << 1 << " ";
        n++;
        mp[v[j]] = 5;
        break;
      }
    }
    if (n == 0) {
      for (int j = 0; j < v1.size(); j++) {
        if (mp[v1[j]] != 5 and i == v1[j]) {
          cout << 2 << " ";
          mp[v1[j]] = 5;
          break;
        }
      }
    }
  }
}
