#include <bits/stdc++.h>
const int maxn = 1e5 + 9;
const int MOD = 1e9 + 7;
using namespace std;
int a[109];
int main() {
  int q;
  while (scanf("%d", &q) != EOF) {
    while (q--) {
      int n;
      scanf("%d", &n);
      for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
      sort(a + 1, a + 1 + n);
      a[0] = 0x3f3f3f3f;
      int flag = 0;
      for (int i = 1; i <= n; i++) {
        if (a[i] - a[i - 1] == 1) {
          flag = 1;
          break;
        }
      }
      if (flag)
        printf("2\n");
      else
        printf("1\n");
    }
  }
}
