#include <bits/stdc++.h>
using namespace std;
void checkDefine();
const long double eps = 1e-9;
const long double eps2 = 2e-9;
long long int n, a, b;
map<long long int, long long int> m;
long long int x;
int main() {
  cin >> n >> a >> b;
  for (int i = (0), _b = (a - 1); i <= _b; i++) {
    cin >> x;
    m[x]++;
  }
  for (int i = (0), _b = (b - 1); i <= _b; i++) {
    cin >> x;
    if (m[x] > 0) continue;
    m[x] += 2;
  }
  for (int i = (1), _b = (100); i <= _b; i++) {
    if (m[i] == 1) {
      cout << 1 << " ";
    } else if (m[i] == 2) {
      cout << 2 << " ";
    }
  }
  return 0;
}
void checkDefine() {
  long long int n, a[300005];
  map<long long int, long long int> m;
  cin >> n;
  for (int i = (0), _b = (n - 1); i <= _b; i++) {
    cin >> a[i];
    m[a[i]]++;
  }
  string s;
  cin >> s;
  {
    cout << "s"
         << " = ";
    cout << (s) << '\n';
  };
  {
    cout << "a"
         << " = ";
    for (int _ = 0, _a = (n); _ < _a; _++) cout << a[_] << ' ';
    cout << '\n';
  };
  {
    cout << "\"------------\""
         << " = ";
    cout << ("------------") << '\n';
  };
  for (__typeof(m.begin()) it = m.begin(); it != m.end(); ++it) {
    cout << it->first << " " << it->second << '\n';
  }
}
