#include <bits/stdc++.h>
using namespace std;
int n;
int a[110];
int main() {
  int T;
  cin >> T;
  while (T--) {
    cin >> n;
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    int cnt = 0;
    for (int i = 1; i <= n; i++)
      for (int j = 1; j < i; j++)
        if (abs(a[i] - a[j]) == 1) cnt++;
    if (cnt == 0)
      cout << 1 << endl;
    else
      cout << 2 << endl;
  }
  return 0;
}
