#include <cstdio>

int main() {
	//freopen ("input.txt","r", stdin);
	//freopen ("output.txt","w", stdout);
	int t;
	scanf("%d", &t);
	for (int i = 0; i < t; ++i) {
		int n;
		scanf("%d", &n);
		int count = 1;
		int prev = -1;
		int cur = 0;
		int max = 0;
		for (int j = 0; j < n; ++j) {
			scanf("%d", &cur);
			if (cur != prev) {
				count = 1;
				prev = cur;
			}
			else {
				count++;
			}

			if (count > max) {
				max = count;
			}
		}
		printf("%d\n", max);
	}
	return 0;
}