#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  scanf("%d", &q);
  while (q--) {
    int n;
    scanf("%d", &n);
    int cnt = 0;
    int aa[1000];
    for (int i = 1; i <= n; i++) {
      scanf("%d", &aa[i]);
    }
    sort(aa + 1, aa + 1 + n);
    int flag = 1;
    for (int i = 2; i <= n; i++) {
      if (aa[i] == aa[i - 1] + 1) {
        flag = 0;
      }
    }
    if (!flag)
      printf("2\n");
    else
      printf("1\n");
  }
  return 0;
}
