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