#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t, temp, n, grp = 1;
  vector<long long> odd;
  vector<long long> even;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> n;
    for (int j = 0; j < n; j++) {
      cin >> temp;
      if (temp % 2 == 0)
        even.push_back(temp);
      else
        odd.push_back(temp);
    }
    for (vector<long long>::iterator it = odd.begin(); it != odd.end(); it++) {
      for (vector<long long>::iterator j = even.begin(); j != even.end(); j++) {
        if (abs(*it - *j) == 1) {
          grp = 2;
          break;
        }
      }
      if (grp == 2) break;
    }
    cout << grp << endl;
    odd.clear();
    even.clear();
    grp = 1;
  }
}
