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