#include <bits/stdc++.h>
using namespace std;
long long int a[1000], b[1000];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<long long int> x, y, z;
  long long int n, res = 0, m, p, q, t, d = 0, d1 = 0, d2 = 0, d3 = 0, d4 = 0;
  string s, s1, kq = "";
  cin >> n;
  while (n--) {
    cin >> m;
    for (long long int i = 1; i <= m; i++) cin >> a[i];
    sort(a + 1, a + 1 + m);
    long long int var = a[1];
    for (long long int i = 2; i <= m; i++) {
      if (a[i] - var <= 1) {
        cout << 2 << endl;
        break;
      } else
        var = a[i];
    }
    if (var == a[m]) cout << 1 << endl;
  }
}
