#include <bits/stdc++.h>
using namespace std;
int main() {
  int test;
  cin >> test;
  while (test--) {
    int num;
    bool ok = true;
    cin >> num;
    int arr[num];
    for (int i = 0; i < num; i++) {
      cin >> arr[i];
    }
    sort(arr, arr + num);
    for (int i = 1; i < num; i++) {
      if (arr[i] - arr[i - 1] <= 1) {
        ok = false;
        break;
      }
    }
    if (!ok) {
      cout << 2 << "\n";
    } else {
      cout << 1 << "\n";
    }
  }
}
