#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q--) {
    int n;
    cin >> n;
    vector<int> v;
    for (int i = 0; i < n; i++) {
      int a;
      cin >> a;
      v.push_back(a);
    }
    int count = 0;
    for (int j = 0; j < n; j++) {
      for (int k = 0; k < n; k++) {
        if ((v[j] - v[k]) == 1) {
          count++;
        }
      }
    }
    if (count == 0)
      cout << 1 << endl;
    else
      cout << 2 << endl;
  }
  return 0;
}
