#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10;
const long long inf = 0x3f3f3f3f3f3f3f3f;
string s;
int a[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int flag = 0;
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    for (int i = 1; i < n; i++) {
      if (a[i] - a[i - 1] == 1) {
        flag = 1;
        break;
      }
    }
    if (flag)
      cout << 2 << endl;
    else
      cout << 1 << endl;
  }
  return 0;
}
