#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i, arr[n];
  for (i = 0; i < n; i++) cin >> arr[i];
  int even = 0, odd = 0;
  for (i = 0; i < n; i++) {
    if (arr[i] % 2 == 0)
      even++;
    else if (arr[i] % 2 == 1 && arr[i] != 1)
      odd++;
    if (even % 2 == 1 && odd % 2 == 1)
      cout << "1\n";
    else if (even % 2 == 0 && odd % 2 == 1)
      cout << "2\n";
    else if (even % 2 == 1 && odd % 2 == 0)
      cout << "1\n";
    else if (arr[i] == 1)
      cout << "2\n";
    else if (even % 2 == 0 && odd % 2 == 0)
      cout << "2\n";
  }
  return 0;
}
