#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  int q;
  scanf("%d", &q);
  for (int i = 0; i < q; ++i) {
    int n;
    scanf("%d", &n);
    int res = 1;
    int a[100];
    for (int i = 0; i < n; ++i) {
      scanf("%d", &a[i]);
    }
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j) {
        if (a[i] - a[j] == 1) {
          res = 2;
          break;
        }
      }
    }
    printf("%d\n", res);
  }
  return 0;
}
