#include <bits/stdc++.h>
using namespace std;
const int Maxn = 235 + 10;
int ans = 0, cnt = 0;
int a[Maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int v[n];
    for (int i = 0; i < n; i++) {
      cin >> v[i];
    }
    int cnt = 0;
    sort(v, v + n);
    ans = 1;
    for (int i = 0; i < n; i++) {
      if (v[i] == v[i + 1] - 1) {
        ans = 2;
        break;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
