#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int a[100];
  while (t--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n);
    int cnt = 1;
    for (int i = 0; i < n - 1; i++) {
      int c = a[i + 1] - a[i];
      if (c == 1) {
        cnt++;
        break;
      }
    }
    cout << cnt << endl;
    cnt = 1;
  }
}
