#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, n, a[300], c;
  cin >> q;
  for (int i = 0; i < q; i++) {
    c = 0;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n);
    for (int i = 0; i < n - 1; i++) {
      if (a[i + 1] - a[i] == 1) {
        c++;
        break;
      } else {
        c = 0;
      }
    }
    if (c != 0) {
      cout << "2" << endl;
    } else {
      cout << "1" << endl;
    }
  }
}
