#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, i, j, n, ar[105];
  cin >> q;
  while (q--) {
    cin >> n;
    for (i = 0; i < n; i++) {
      cin >> ar[i];
    }
    sort(ar, ar + n);
    bool yes = false;
    for (i = 1; i < n; i++) {
      if (ar[i - 1] + 1 == ar[i]) yes = true;
    }
    if (yes)
      cout << "2\n";
    else
      cout << "1\n";
  }
  return 0;
}
