Nezzar has $n$ balls, numbered with integers $1, 2, \ldots, n$. Numbers $a_1, a_2, \ldots, a_n$ are written on them, respectively. Numbers on those balls form a non-decreasing sequence, which means that $a_i \leq a_{i+1}$ for all $1 \leq i < n$.

Nezzar wants to color the balls using the minimum number of colors, such that the following holds.

For any color, numbers on balls will form a strictly increasing sequence if he keeps balls with this chosen color and discards all other balls.

Note that a sequence with the length at most $1$ is considered as a strictly increasing sequence.

Please help Nezzar determine the minimum number of colors.


-----Input-----

The first line contains a single integer $t$ ($1 \le t \le 100$) — the number of testcases.

The first line of each test case contains a single integer $n$ ($1 \le n \le 100$).

The second line of each test case contains $n$ integers $a_1,a_2,\ldots,a_n$ ($1 \le a_i \le n$). It is guaranteed that $a_1 \leq a_2 \leq \ldots \leq a_n$.


-----Output-----

For each test case, output the minimum number of colors Nezzar can use.


-----Examples-----

Input
5
6
1 1 1 2 3 4
5
1 1 2 2 3
4
2 2 2 2
3
1 2 3
1
1
Output
3
2
4
1
1


-----Note-----

Let's match each color with some numbers. Then:

In the first test case, one optimal color assignment is $[1,2,3,3,2,1]$.

In the second test case, one optimal color assignment is $[1,2,1,2,1]$.

Difficulty: EASY

Solutions:
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	maxf = 1
	f = 1
	for i in range(1, n):
		if a[i] == a[i - 1]:
			f += 1
		else:
			f = 1
		if f > maxf:
			maxf = f
	print(maxf)


t = int(input())
for t in range(t):
	p = int(input())
	lst = list(map(int, input().split()))
	q = max1 = 0
	for i in range(1, p):
		if lst[i - 1] == lst[i]:
			q += 1
		else:
			max1 = max(max1, q)
			q = 0
	max1 = max(max1, q)
	print(max1 + 1)


t = int(input())
for j in range(0, t):
	n = int(input())
	a = [int(x) for x in input().split()]
	dp = [0 for i in range(0, max(a) + 1)]
	for i in a:
		dp[i] += 1
	maxi = max(dp)
	print(maxi)


for _ in range(int(input())):
	n = int(input())
	arr = tuple(map(int, input().strip().split()))
	dic = {}
	for i in arr:
		if i not in dic:
			dic[i] = 1
		else:
			dic[i] += 1
	print(max(dic.values()))


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	x = set(arr)
	a = 0
	for i in range(n):
		a = max(a, arr.count(arr[i]))
	print(a)


ans = []
for _ in range(int(input())):
	n = int(input())
	u = list(map(int, input().split()))
	mx = 1
	k = 1
	for i in range(1, n):
		if u[i] == u[i - 1]:
			k += 1
		else:
			mx = max(mx, k)
			k = 1
	mx = max(mx, k)
	ans.append(mx)
print('\n'.join(map(str, ans)))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	cnt = 1
	max_cnt = 1
	for i in range(n - 1):
		if a[i] == a[i + 1]:
			cnt += 1
		else:
			max_cnt = max(cnt, max_cnt)
			cnt = 1
	max_cnt = max(cnt, max_cnt)
	print(max_cnt)


def maxColorsNeeded():
	n = int(input())
	if n == 1:
		l1 = input().split(' ')
		print(1)
		return
	l1 = input().split(' ')
	ball = int(l1[0])
	currentColor = 1
	maxColors = 1
	for j in range(1, n):
		if ball == int(l1[j]):
			currentColor += 1
			if currentColor > maxColors:
				maxColors = currentColor
		else:
			currentColor = 1
			ball = int(l1[j])
	print(maxColors)
	return
t = int(input())
for i in range(0, t):
	maxColorsNeeded()


import sys
import math

def deeznuts(l, a):
	count = 0
	max = 0
	for i in range(l):
		b = a.count(a[i])
		if b > max:
			max = b
	return max
input = sys.stdin.read()
data = list(map(int, input.split()))
t = data[0]
n = 0
for i in range(t):
	l = data[1 + n]
	a = list(map(int, data[2 + n:2 + n + l]))
	n = n + l + 1
	print(deeznuts(l, a))


while True:
	try:
		t = eval(input())
		for i in range(t):
			n = eval(input())
			list0 = list(map(int, input().split()))
			list1 = list(set(list0))
			len1 = len(list1)
			max1 = 0
			for j in range(len1):
				if max1 < list0.count(list1[j]):
					max1 = list0.count(list1[j])
			print(max1)
	except:
		break


from collections import Counter
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = Counter(a)
	c = []
	for (k, v) in b.items():
		c.append(v)
	print(max(c))


t = int(input())
for t in range(t):
	n = int(input())
	nabor_digit = [int(i) for i in input().split()]
	matrix = []
	for i in nabor_digit:
		flag = False
		if len(matrix) == 0:
			matrix.append([i])
			continue
		for j in range(len(matrix)):
			if i > matrix[j][len(matrix[j]) - 1]:
				matrix[j].append(i)
				flag = True
				break
		if not flag:
			matrix.append([i])
	print(len(matrix))


from collections import Counter as count
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print(count(l).most_common(1)[0][1])


t = int(input())
for i in range(t):
	n = int(input())
	aas = [int(x) for x in input().split(' ')]
	dic = [0 for i in list(range(n + 1))]
	for a in aas:
		dic[a] += 1
	print(max(dic))


t = int(input())
for j in range(0, t):
	n = int(input())
	s = list(map(int, input().split()))
	p = {}
	for i in range(0, n):
		if p.get(s[i], -1) == -1:
			p[s[i]] = 1
		else:
			p[s[i]] += 1
	zd = 0
	for i in p:
		zd = max(zd, p[i])
	print(zd)


import math
from collections import defaultdict
from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	d = defaultdict(int)
	for i in arr:
		d[i] += 1
	ans = 0
	for i in d:
		ans = max(ans, d[i])
	print(ans)


import sys
t = int(sys.stdin.readline())
for i in range(t):
	n = int(sys.stdin.readline())
	nums = sys.stdin.readline().strip('\n').split()
	nums = [int(i) for i in nums]
	d = {}
	for i in nums:
		if i not in d:
			d[i] = 0
		d[i] += 1
	maxi = 0
	for i in d:
		if d[i] > maxi:
			maxi = d[i]
	print(maxi)


n = int(input())
for i in range(n):
	balls = int(input())
	nums = (int(x) for x in input().split(' '))
	count = [0 for _ in range(balls + 1)]
	mx = 0
	for m in nums:
		count[m] += 1
		if count[m] > mx:
			mx = count[m]
	print(mx)


t = int(input())
l3 = []
for i in range(t):
	n = int(input())
	l = []
	l = list(map(int, input().split()))
	if len(l) == n:
		l2 = []
		for k in l:
			l2.append(l.count(k))
	l3.append(max(l2))
for i in l3:
	print(i)


import math
for _ in range(int(input())):
	n = int(input())
	ans = 0
	l = list(map(int, input().split()))
	s = set(l)
	ans = -1
	for i in s:
		ans = max(ans, l.count(i))
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	max = 1
	c = 1
	b = 0
	arr = input()
	h = arr.split(' ')
	for i in range(n):
		d = int(h[i])
		if d == b:
			c += 1
			if c > max:
				max = c
		else:
			b = d
			if c > max:
				max = c
			c = 1
	print(str(max) + '\n')


import sys, collections, math, itertools, random, bisect
INF = sys.maxsize

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = int(1000000000.0 + 7)
for _ in range(int(input())):
	n = int(input())
	arr = get_array()
	c = collections.Counter(arr)
	mx = max(c.values())
	print(mx)


t = int(input())
for hh in range(0, t):
	n = int(input())
	a = [int(x) for x in input().split()]
	d = dict()
	for i in range(0, n):
		if a[i] not in d:
			d[a[i]] = 1
		else:
			d[a[i]] += 1
	mx = 0
	for i in d:
		mx = max(mx, d[i])
	print(mx)


t = int(input())
for i in range(t):
	n = int(input())
	a = input()
	a = [int(x) for x in a.split(' ')]
	final = 0
	ans = 1
	for j in range(1, len(a)):
		if a[j] == a[j - 1]:
			ans += 1
		else:
			final = max(final, ans)
			ans = 1
	final = max(final, ans)
	print(final)


for _ in range(int(input())):
	n = int(input())
	balls = list(map(int, input().split()))
	min_colours = 0
	for i in set(balls):
		if balls.count(i) > min_colours:
			min_colours = balls.count(i)
	print(min_colours)


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	f = 0
	d = {}
	for i in a:
		if i not in d:
			d[i] = 1
		else:
			d[i] += 1
	m = 0
	for i in d:
		if d[i] > 1:
			f = 1
			if d[i] > m:
				m = d[i]
	if f == 1:
		print(m)
	else:
		print(1)


import os
import sys
from io import BytesIO, IOBase
from collections import Counter

def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		c = Counter(a)
		ans = 0
		for val in c.values():
			ans = max(ans, val)
		print(ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
from collections import Counter

def main():
	test_cases = int(sys.stdin.readline())
	for _ in range(test_cases):
		N = int(sys.stdin.readline())
		ctr = Counter((int(i) for i in sys.stdin.readline().split()))
		print(max(ctr.values()))
main()


from collections import Counter
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	dic_a = dict(Counter(a))
	max_key = max(dic_a, key=dic_a.get)
	print(dic_a[max_key])


t = int(input())
while t > 0:
	n = int(input())
	lst = list(map(int, input().split()))
	unq = []
	dic = {}
	for item in lst:
		if item in dic:
			dic[item] += 1
		else:
			dic[item] = 1
	ans = []
	for value in dic.values():
		ans.append(value)
	print(max(ans))
	t -= 1


for _ in range(int(input())):
	n = int(input())
	a = [*map(int, input().split())]
	d = {}
	for i in range(n):
		d[a[i]] = d.get(a[i], 0) + 1
	print(max(d.values()))


import sys
from sys import stdin, stdout

def get_ints_in_variables():
	return map(int, sys.stdin.readline().strip().split())

def get_ints_in_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()

def Solution(arr, n):
	hm = {}
	for v in arr:
		if v in hm:
			hm[v] += 1
		else:
			hm[v] = 1
	ans = -1
	for u in hm:
		if hm[u] > ans:
			ans = hm[u]
	print(ans)

def main():
	for _ in range(int(input())):
		n = int(input())
		arr = get_ints_in_list()
		Solution(arr, n)
main()


from collections import deque, Counter, defaultdict as dft
from heapq import heappop, heappush
from math import log, sqrt, factorial, cos, tan, sin, radians, log2, ceil, floor
from bisect import bisect, bisect_left, bisect_right
from decimal import *
import sys, threading
from itertools import permutations, combinations
from copy import deepcopy
input = sys.stdin.readline
ii = lambda : int(input())
si = lambda : input().rstrip()
mp = lambda : map(int, input().split())
ms = lambda : map(str, input().strip().split(' '))
ml = lambda : list(mp())
mf = lambda : map(float, input().split())

def solve():
	n = ii()
	arr = ml()
	mx = 1
	pre = arr[0]
	count = 1
	for i in range(1, n):
		if arr[i] == pre:
			count += 1
			mx = max(mx, count)
		else:
			pre = arr[i]
			count = 1
	print(mx)
tc = ii()
for i in range(tc):
	solve()


import math
for i in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	mx = 0
	mp = {}
	for x in li:
		if x in mp:
			mp[x] += 1
		else:
			mp[x] = 1
		mx = max(mp[x], mx)
	print(mx)


from pprint import pprint
import sys
input = sys.stdin.readline
import collections

def do():
	n = int(input())
	dat = list(map(int, input().split()))
	C = collections.Counter(dat)
	res = 0
	for k in C.keys():
		res = max(res, C[k])
	print(res)
q = int(input())
for _ in range(q):
	do()


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	ans = 0
	d = dict()
	for i in range(n):
		if arr[i] in d:
			d[arr[i]] += 1
		else:
			d[arr[i]] = 1
		ans = max(ans, d[arr[i]])
	print(ans)


from math import *
from collections import *

def panda(n, l):
	d = defaultdict(int)
	for i in l:
		d[i] += 1
	return max(d.values())
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print(panda(n, l))


import collections
for _ in range(int(input())):
	input()
	k = list(map(int, input().split()))
	c = collections.Counter(k)
	print(max(c.values()))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def prod(a, mod=10 ** 9 + 7):
	ans = 1
	for each in a:
		ans = ans * each % mod
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	n = int(input())
	a = list(map(int, input().split()))
	count = [0] * (n + 69)
	for i in a:
		count[i] += 1
	print(max(count))


T = int(input())
for t in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	size = 1
	i = 0
	while i < n - 1:
		count = 1
		while i < n - 1 and a[i] == a[i + 1]:
			count += 1
			i += 1
		if count > size:
			size += count - size
		i += 1
	print(size)


from collections import *

def solve(n, l):
	a = Counter(l)
	res = a.most_common(1)[0][1]
	return res
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	print(solve(n, l))


from collections import Counter

def A(a, n):
	if n == 1:
		return 1
	c = Counter(a)
	mx = 1
	for i in c:
		if mx < c[i]:
			mx = c[i]
	return mx
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	print(A(a, n))


def solve(n, a):
	c = 1
	m = 1
	prev = a[0]
	for i in range(1, n):
		if a[i] - prev == 0:
			c += 1
		elif a[i] - prev > 0:
			c = 1
		prev = a[i]
		m = c if c > m else m
	return m
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(solve(n, a))


t = int(input())
for i in range(t):
	n = int(input())
	b = list(map(int, input().split()))
	cnt = [0] * 200
	for j in range(n):
		cnt[b[j]] += 1
	print(max(cnt))


x = ''
for _ in range(int(input())):
	input()
	a = list(map(int, input().split()))
	c = 0
	for j in set(a):
		if c < a.count(j):
			c = a.count(j)
	x = x + str(c) + '\n'
print(x)


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	p = l[0]
	count = 0
	copy = 0
	for j in l:
		if p == j:
			if copy <= 1:
				count += 1
			else:
				copy -= 1
		else:
			copy = count
		p = j
	print(count)


for t in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	x = set(ar)
	if len(x) == n or n == 1:
		print(1)
		continue
	ans = 0
	for i in x:
		ans = max(ans, ar.count(i))
	print(ans)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	res = 1
	i = 0
	while i < n:
		count = 1
		while i < n - 1 and arr[i] == arr[i + 1]:
			i += 1
			count += 1
		i += 1
		res = max(res, count)
	print(res)


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.buffer.readline())

def MI():
	return map(int, sys.stdin.buffer.readline().split())

def LI():
	return list(map(int, sys.stdin.buffer.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def BI():
	return sys.stdin.buffer.readline().rstrip()

def SI():
	return sys.stdin.buffer.readline().rstrip().decode()
inf = 10 ** 16
md = 10 ** 9 + 7
from collections import Counter
for _ in range(II()):
	II()
	ac = Counter(MI())
	print(max(ac.values()))


for testcasers in range(int(input(''))):
	n = int(input(''))
	a = list(map(int, input('').split()))
	ct = 0
	while len(a) != 0:
		b = list(set(a))
		for i in b:
			a.remove(i)
		ct += 1
	print(ct)


def linp():
	return list(map(int, input().split()))

def inp():
	return input()

def intinp():
	return int(input())

def multinp():
	return map(int, input().split())

def SieveOfEratosthenes(n):
	res = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			res.append(p)
	return res

def factors(n):
	divs = []
	i = 2
	while i * i <= n:
		if n % i == 0:
			if i == n // i:
				divs.append(i)
			else:
				divs.append(i)
				divs.append(n // i)
		i += 1
	return divs
for _ in range(intinp()):
	n = intinp()
	a = linp()
	x = len(set(a))
	if n == x:
		print(1)
	elif x == 1:
		print(n)
	else:
		d = dict.fromkeys(a, 0)
		for i in a:
			d[i] += 1
		print(max(d.values()))


import functools

def readint():
	return list(map(int, input().split()))

class _dict:

	def __init__(self):
		self.dict = dict()

	def __getitem__(self, key):
		if key in self.dict:
			return self.dict[key]
		else:
			return 0

	def __setitem__(self, key, value):
		self.dict[key] = value

def comparator(x, y):
	return x < y
comparator = functools.cmp_to_key(comparator)
yes = 'YES\n'
no = 'NO\n'
(tc,) = readint()
while tc > 0:
	tc -= 1
	(n,) = readint()
	l1 = readint()
	ans = 0
	nc = 0
	now = l1[0]
	for i in l1:
		if i == now:
			nc += 1
		else:
			now = i
			ans = max(ans, nc)
			nc = 1
	ans = max(ans, nc)
	print(ans)


t = int(input())
for kk in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	d = {}
	for i in a:
		d[i] = d.get(i, 0) + 1
	print(max(d.values()))


for i in range(int(input())):
	n = int(input())
	l = [*map(int, input().strip().split())]
	z = [0] * n
	for i in l:
		z[i - 1] += 1
	print(max(z))


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	dic = dict()
	for i in arr:
		dic[i] = dic.get(i, 0) + 1
	val = dic.values()
	print(max(val))


for t in range(0, int(input())):
	n = int(input())
	b = list(map(int, input().split()))
	ans = {}
	for i in b:
		if i not in ans:
			ans[i] = 1
		else:
			ans[i] += 1
	mx = 0
	for j in ans:
		mx = max(ans[j], mx)
	print(mx)


t = int(input())
for i in range(t):
	n = int(input())
	ans = 1
	cur = 1
	arr = list(map(int, input().split()))
	for j in range(1, n):
		if arr[j] == arr[j - 1]:
			cur += 1
		else:
			cur = 1
		ans = max(ans, cur)
	print(ans)


import sys
input = sys.stdin.readline

def println(val):
	sys.stdout.write(str(val) + '\n')
ans = []

def solve():
	global ans
	n = int(input())
	a = list(map(int, input().split()))
	import collections
	cnt = collections.Counter(a)
	res = 0
	for key in cnt:
		if cnt[key] > res:
			res = cnt[key]
	ans += [str(res)]
for _ in range(int(input()) if 1 else 1):
	solve()
print('\n'.join(ans))


from collections import Counter as c
for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	d = dict(c(a))
	l = d.values()
	print(max(l))


t = int(input())
for i in range(t):
	a = int(input())
	m = list(map(int, input().split()))
	ma = 0
	n = [0] * (a + 1)
	for i in range(a):
		n[m[i]] += 1
	print(max(n))


a = int(input())
while a:
	c = int(input())
	b = list(map(int, input().split()))
	h = []
	j = 1
	for i in range(c):
		if i == c - 1:
			h.append(j)
		elif b[i] != b[i + 1]:
			h.append(j)
			j = 1
		else:
			j += 1
	a -= 1
	print(max(h))


from collections import Counter
for t in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	d = list(dict(Counter(arr)).values())
	print(max(d))


k = []
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = set(a)
	j = 1
	for i in b:
		j = max(j, a.count(i))
	k.append(j)
for i in k:
	print(i)


T = int(input())
for i in range(T):
	N = int(input())
	L = list(map(int, input().split()))
	(count, max) = (1, 1)
	for j in range(1, N):
		if L[j] == L[j - 1]:
			count += 1
		else:
			if max <= count:
				max = count
			count = 1
	if max <= count:
		max = count
	print(max)


import math

def solve(arr, n):
	freq = dict()
	for a in arr:
		freq[a] = freq.get(a, 0) + 1
	return max(freq.values())
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(solve(arr, n))


import sys
import math
import collections
input = sys.stdin.readline
t = int(input())
for w in range(t):
	n = int(input())
	l = [int(i) for i in input().split()]
	d = collections.Counter(l)
	print(max(d.values()))


from collections import Counter
t = int(input())
repeats = []
for i in range(t):
	n = int(input())
	ips = input().split(' ')
	a = dict(Counter(ips))
	max = 0
	for (key, value) in a.items():
		if value > max:
			max = value
	repeats.append(max)
for repeat in repeats:
	print(repeat)


for _ in range(int(input())):
	maxx = 1
	x = 1
	n = int(input())
	A = list(map(int, input().split()))
	for i in range(1, len(A)):
		if A[i] == A[i - 1]:
			x += 1
			maxx = max(x, maxx)
		else:
			x = 1
	print(maxx)


for _ in range(int(input())):
	n = int(input())
	array = list(map(int, input().split()))
	s = list(set(array))
	counts = []
	for i in s:
		counts.append(array.count(i))
	print(max(counts))


def func(n, l):
	i = 1
	m = 0
	c = 1
	while i < n:
		if l[i] == l[i - 1]:
			c = c + 1
		else:
			if c > m:
				m = c
			c = 1
		i = i + 1
	if c > m:
		m = c
	return m
t = int(input())
for e in range(0, t):
	n = int(input())
	l = list(map(int, input().split()))
	print(func(n, l))


for i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	freq = {}
	for item in arr:
		if item in freq:
			freq[item] += 1
		else:
			freq[item] = 1
	maxi = 0
	for (i, k) in freq.items():
		if k > maxi:
			maxi = k
	print(maxi)


for _ in range(int(input())):
	n = int(input())
	(*arr,) = map(int, input().split())
	cnt = 1
	ans = 1
	for i in range(1, n):
		if arr[i] == arr[i - 1]:
			cnt += 1
		else:
			ans = max(ans, cnt)
			cnt = 1
	ans = max(ans, cnt)
	print(ans)


import collections
n = int(input())
for i in range(n):
	x = int(input())
	l = list(map(int, input().split()))
	c = collections.Counter(l)
	r = c.values()
	print(max(r))


t = int(input())
for tt in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	d = {}
	m = 1
	for i in a:
		if i not in d:
			d[i] = 1
		else:
			d[i] += 1
			m = max(m, d[i])
	print(m)


from collections import Counter
for i in range(int(input())):
	a = int(input())
	b = [int(x) for x in input().split()]
	c = []
	for i in b:
		c.append(b.count(i))
	print(max(c))


from collections import Counter
for test in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	dic = Counter(arr)
	counts = dic.values()
	print(max(counts))


def minColor(a):
	res = 0
	count = 1
	a = a + [0]
	for i in range(1, len(a)):
		if a[i] == a[i - 1]:
			count += 1
		else:
			if count > res:
				res = count
			count = 1
	return res
t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	print(minColor(a))


import sys
N = int(sys.stdin.readline())
for _ in range(N):
	maxiam = 1
	a = sys.stdin.readline()
	array = list(map(int, sys.stdin.readline().split(' ')))
	candis = set(array)
	for candi in candis:
		maxiam = max(maxiam, array.count(candi))
	print(maxiam)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = 1
	m = 1
	for i in range(n - 1):
		if a[i + 1] == a[i]:
			s += 1
		else:
			s = 1
		if m < s:
			m = s
	print(m)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	d = {}
	m = 0
	for k in a:
		if k not in d:
			d[k] = 1
		else:
			d[k] += 1
		m = max(m, d[k])
	print(m)


import sys
from collections import Counter

def input():
	return sys.stdin.readline()
test_case = int(input())
for _ in range(test_case):
	n = int(input())
	a = list(map(int, input().split()))
	d = Counter(a)
	print(max(d.values()))


t = int(input())
for z in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	if n == 1:
		print(1)
	else:
		ans = 0
		x = 1
		for i in range(0, n - 1):
			if l[i] == l[i + 1]:
				x += 1
				if i == n - 2 and ans == 0:
					ans = x
				if i == n - 2:
					if x > ans:
						ans = x
			else:
				if x > ans:
					ans = x
				x = 1
		print(ans)


import math, sys, itertools
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
for t in [wtf[i:i + 2] for i in range(1, len(wtf), 2)]:
	n = int(t[0])
	A = list(map(int, t[1].split()))
	tmp = [0] * (n + 1)
	for a in A:
		tmp[a] += 1
	print(max(tmp))


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz/'
M = 1000000007
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
from itertools import groupby
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split(' ')))
	cnt = 0
	while len(a) > 0:
		prev = 0
		toremove = set()
		toremove.add(prev)
		for x in range(len(a)):
			if a[x] > a[prev]:
				toremove.add(x)
				prev = x
		cnt += 1
		temp = []
		for x in range(len(a)):
			if x not in toremove:
				temp.append(a[x])
		a = list(temp)
	print(cnt)


from collections import Counter

def neymar(A):
	z = Counter(A)
	A = list(z.values())
	print(max(A))
t = int(input())
for x in range(t):
	n = int(input())
	A = [int(i) for i in input().split()][:n]
	neymar(A)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	g = list(set(l))
	k = []
	for i in g:
		k.append(l.count(i))
	print(max(k))


from collections import Counter
for _ in range(int(input())):
	n = int(input())
	a = Counter(map(int, input().split()))
	print(max(a.values()))


def STR():
	return list(input())

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def MAP2():
	return map(float, input().split())

def LIST():
	return list(map(int, input().split()))

def STRING():
	return input()
import string
import sys
from heapq import heappop, heappush
from bisect import *
from collections import deque, Counter, defaultdict
from math import *
from itertools import permutations, accumulate
dx = [-1, 1, 0, 0]
dy = [0, 0, 1, -1]
ans = []
for tt in range(INT()):
	n = INT()
	a = LIST()
	mp = Counter(a)
	Max = float('-inf')
	for i in mp:
		Max = max(Max, mp[i])
	print(Max)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = set(a)
	maxBall = 0
	for i in b:
		if a.count(i) > maxBall:
			maxBall = a.count(i)
	print(maxBall)


from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	d = defaultdict(lambda : 0)
	c = 0
	for i in lst:
		d[i] += 1
		if d[i] > c:
			c = d[i]
	print(c)


t = int(input())
for items in range(t):
	count = {}
	n = int(input())
	x = list(map(int, input().split()))[:n]
	for i in x:
		count[i] = count.get(i, 0) + 1
	print(max(count.values()))


from collections import Counter
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	print(Counter(a).most_common()[0][1])


def problemA():
	t = int(input())
	N = list()
	A = list()
	for i in range(t):
		N.append(int(input()))
		A.append([int(el) for el in input().split()])
	for i in range(t):
		colourMax = 1
		if N[i] == 1:
			print(colourMax)
		else:
			colour = 1
			for j in range(N[i] - 1):
				if A[i][j] == A[i][j + 1]:
					colour += 1
				else:
					colourMax = max(colour, colourMax)
					colour = 1
			colourMax = max(colour, colourMax)
			print(colourMax)
problemA()


import heapq as hq
from heapq import heappop, heappush
from collections import deque, defaultdict, Counter
from sys import stdin, stdout

def inp():
	return int(stdin.readline())

def inlt():
	return list(map(int, stdin.readline().split()))

def insr():
	return list(stdin.readline().strip())

def invr():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def subset_sum_count(arr, n, sum):
	dp = [[0 for _ in range(sum + 1)] for _ in range(n + 1)]
	for i in range(n + 1):
		for j in range(sum + 1):
			if j == 0:
				dp[i][j] = 1
			elif arr[i - 1] <= j:
				dp[i][j] = dp[i - 1][j - arr[i - 1]] + dp[i - 1][j]
			else:
				dp[i][j] = dp[i - 1][j]
	return dp[n][sum]

def binary_search(func, lo, hi, abs_prec=1e-07):
	while abs(hi - lo) > abs_prec:
		mi = lo + (hi - lo) / 2
		if func(mi):
			hi = mi
		else:
			lo = mi
	return (lo + hi) / 2

def ternary_search(func, lo, hi, abs_prec=1e-07):
	while abs(hi - lo) > abs_prec:
		lo_third = lo + (hi - lo) / 3
		hi_third = hi - (hi - lo) / 3
		if func(lo_third) < func(hi_third):
			lo = lo_third
		else:
			hi = hi_third
	return (lo + hi) / 2

def discrete_binary_search(func, lo, hi):
	while lo < hi:
		mi = lo + (hi - lo) // 2
		if func(mi):
			hi = mi
		else:
			lo = mi + 1
	return lo

def discrete_ternary_search(func, lo, hi):
	while lo <= hi:
		lo_third = lo + (hi - lo) // 3
		hi_third = lo + (hi - lo) // 3 + (1 if 0 < hi - lo < 3 else (hi - lo) // 3)
		if func(lo_third) < func(hi_third):
			lo = lo_third + 1
		else:
			hi = hi_third - 1
	return lo
	return -1

def right_rotate(a, s):
	return a[s:] + a[:s]

def dec_to_bin(x):
	return int(bin(x)[2:])

def str_to_integer_list(n):
	a = []
	for i in range(len(n)):
		a.append(int(n[i]))
	return a

def list_to_str(l):
	s = ''
	for i in l:
		s += str(i)
	return s

def dijkstra(s, N, E):
	visited = set()
	dist = {}
	for i in range(1, N + 1):
		dist[i] = 1 << 29
	queue = [(dist[i], i) for i in range(1, N + 1)]
	hq.heappush(queue, (0, s))
	dist[s] = 0
	while queue:
		(d, u) = hq.heappop(queue)
		if u in visited:
			continue
		for t in E[u]:
			(v, r) = t
			if dist[v] > d + r:
				dist[v] = d + r
				hq.heappush(queue, (dist[v], v))
		visited.add(u)
	return dist

def prime_sieve(n):
	flag = n % 6 == 2
	sieve = bytearray((n // 3 + flag >> 3) + 1)
	for i in range(1, int(n ** 0.5) // 3 + 1):
		if not sieve[i >> 3] >> (i & 7) & 1:
			k = 3 * i + 1 | 1
			for j in range(k * k // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
			for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
	return sieve

def prime_list(n):
	res = []
	if n > 1:
		res.append(2)
	if n > 2:
		res.append(3)
	if n > 4:
		sieve = prime_sieve(n + 1)
		res.extend((3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not sieve[i >> 3] >> (i & 7) & 1))
	return res

def dijkstra(n, graph, start):
	(dist, parents) = ([float('inf')] * n, [-1] * n)
	dist[start] = 0
	queue = [(0, start)]
	while queue:
		(path_len, v) = heappop(queue)
		if path_len == dist[v]:
			for (w, edge_len) in graph[v]:
				if edge_len + path_len < dist[w]:
					(dist[w], parents[w]) = (edge_len + path_len, v)
					heappush(queue, (edge_len + path_len, w))
	return (dist, parents)

def path(start, end, parent):
	path = [end]
	while path[-1] != start:
		path.append(parent[path[-1]])
	path.reverse()
	return path

def bfs(graph, start, goal):
	if start == goal:
		return [start]
	visited = {start}
	queue = deque([(start, [])])
	while queue:
		(current, path) = queue.popleft()
		visited.add(current)
		for neighbor in graph[current]:
			if neighbor == goal:
				return path + [current, neighbor]
			if neighbor in visited:
				continue
			queue.append((neighbor, path + [current]))
			visited.add(neighbor)
	return None

def fillPrefixSum(arr, n, prefixSum):
	prefixSum[0] = arr[0]
	for i in range(1, n):
		prefixSum[i] = prefixSum[i - 1] + arr[i]

def check(a, ind, d1):
	beg = a[:ind + 1]
	end = a[ind + 1:]
	d = []
	c = 0
	for i in end:
		if i - d1 in beg:
			c += 1
	return c
import os
import sys
from io import BytesIO, IOBase

def DecimalToBinary(n):

	def helper(n):
		if n == 0:
			return ''
		else:
			if n % 2 == 1:
				binaryDigit = '1'
			else:
				binaryDigit = '0'
			return helper(n // 2) + binaryDigit
	if n == 0:
		result = '0'
	else:
		result = helper(n)
	return result

def p(board):
	for i in range(8):
		s = ''
		for j in range(8):
			s += board[i][j]
		print(s)

def binaryToDecimal(n):
	return int(n, 2)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def mostFrequent(arr, n):
	arr.sort()
	max_count = 1
	res = arr[0]
	curr_count = 1
	for i in range(1, n):
		if arr[i] == arr[i - 1]:
			curr_count += 1
		else:
			if curr_count > max_count:
				max_count = curr_count
				res = arr[i - 1]
			curr_count = 1
	if curr_count > max_count:
		max_count = curr_count
		res = arr[n - 1]
	return res
from bisect import bisect_right, bisect_left

def lds(arr, n):
	lds = [0] * n
	max = 0
	for i in range(n):
		lds[i] = 1
	for i in range(1, n):
		for j in range(i):
			if arr[i] < arr[j] and lds[i] < lds[j] + 1:
				lds[i] = lds[j] + 1
	for i in range(n):
		if max < lds[i]:
			max = lds[i]
	return max
import math

def prefix(a):
	pre = []
	pre.append(a[0])
	for i in range(1, len(a)):
		pre.append(pre[i - 1] + a[i])
	return pre
from collections import defaultdict

class Graph:

	def __init__(self, v):
		self.v = v
		self.graph = defaultdict(list)

	def add_edge(self, u, v):
		self.graph[u].append(v)

	def display(self):
		print(dict(self.graph))

	def find_parent(self, parent, i):
		if parent[i] == -1:
			return i
		else:
			return self.find_parent(parent, parent[i])

	def union(self, parent, x, y):
		x_set = self.find_parent(parent, x)
		y_set = self.find_parent(parent, y)
		parent[x_set] = y_set

	def is_cyclic(self):
		parent = [-1] * self.v
		for i in self.graph:
			for j in self.graph[i]:
				x = self.find_parent(i)
				y = self.find_parent(j)
				if x == y:
					return True
				self.union(x, y)
dx = [-1, 1, 0, 0, 1, 1, -1, -1]
dy = [0, 0, 1, -1, 1, -1, 1, -1]

def is_valid(x, y, matrix, vis):
	if x < 0 and y < 0 and (x >= len(matrix)) and (y >= len(matrix[0])):
		return False
	if vis[x][y] != 1 or matrix[x][y] == 0:
		return False
	return True

def dfs(i, j, matrix, vis):
	stack = [(i, j)]
	cc = 1
	vis[i][j] = 1
	while stack:
		(x, y) = stack.pop()
		for i in range(8):
			new_x = x + dx[i]
			new_y = y + dy[i]
			if is_valid(new_x, new_y, matrix, vis):
				vis[new_x][new_y] = 1
				stack.append((new_x, new_y))
				cc += 1
	return cc

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
from itertools import cycle
for _ in range(inp()):
	n = inp()
	a = inlt()
	d = dict(Counter(a))
	res = []
	for (i, j) in d.items():
		res.append(j)
	print(max(res))


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	maximum = 0
	previous = arr[0]
	k = 1
	for j in range(1, len(arr)):
		if arr[j] == previous:
			k += 1
		else:
			maximum = max(k, maximum)
			k = 1
		previous = arr[j]
	maximum = max(maximum, k)
	print(maximum)


from sys import *
from collections import defaultdict as dd
from math import *
from bisect import *

def sinp():
	return input()

def inp():
	return int(sinp())

def minp():
	return map(int, sinp().split())

def linp():
	return list(minp())

def strl():
	return list(sinp())

def pr(x):
	print(x)
mod = int(1000000000.0 + 7)
for _ in range(inp()):
	n = inp()
	a = linp()
	d = dd(int)
	for i in a:
		d[i] += 1
	pr(max(d.values()))


t = int(input())
for j in range(t):
	n = int(input())
	m = input().split()
	d = {}
	for i in range(n):
		d[m[i]] = 0
	for i in range(n):
		d[m[i]] += 1
	maxk = 0
	for i in d:
		if d[i] > maxk:
			maxk = d[i]
	print(maxk)


import sys
from math import *
from collections import *
from itertools import *

def solve(n, arr):
	c = Counter(arr)
	most = c.most_common(1)
	for (i, ele) in most:
		return ele
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, sys.stdin.readline().strip().split()))
	print(solve(n, arr))


for T in range(int(input())):
	n = int(input())
	l = [int(i) for i in input().split(' ')]
	print(max([l.count(i) for i in set(l)]))


def solve():
	n = int(input())
	l = list(map(int, input().split()))
	d = {}
	for i in l:
		if i in d:
			d[i] = d[i] + 1
		else:
			d[i] = 1
	print(max(d.values()))
for testis in range(int(input())):
	solve()


from collections import Counter
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split(' ')))
	if len(a) == 1:
		print(1)
		continue
	ac = Counter(a)
	lst = ac.most_common(1)
	print(lst[0][1])


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = set(a)
	c = [a.count(i) for i in b]
	ans.append(max(c))
for i in ans:
	print(i)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	mc = 1
	c = 1
	for j in range(1, n):
		if a[j] == a[j - 1]:
			c += 1
			mc = max(mc, c)
		else:
			c = 1
	print(mc)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	ls = list(map(int, input().split()))
	dc = {}
	cnt = 0
	max_ = 0
	for i in range(n):
		if ls[i] not in dc:
			dc[ls[i]] = 1
			cnt += 1
		else:
			dc[ls[i]] += 1
		max_ = max(max_, dc[ls[i]])
	print(max_)


from collections import Counter

def ints():
	return list(map(int, input().split()))

def go():
	(n,) = ints()
	a = ints()
	ans = solve(a)
	print(ans)

def solve(a):
	c = Counter(a)
	return max(c.values())
(num_cases,) = ints()
for case_num in range(num_cases):
	go()


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	count = 1
	b = []
	flag = 0
	for i in range(len(a) - 1):
		if a[i] == a[i + 1]:
			count += 1
		else:
			flag = 1
			b.append(count)
			count = 1
	b.append(count)
	if b != []:
		print(max(b))
	else:
		print(len(a))
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(d) for d in input().split()]
	d = {}
	for i in a:
		if i not in d:
			d[i] = 1
		else:
			d[i] += 1
	max_ = -1
	for i in d:
		if d[i] > max_:
			max_ = d[i]
	print(max_)


t = int(input())
s = [0] * t
for i in range(t):
	n = int(input())
	a = map(int, input().split())
	a = list(a)
	last = 0
	for k in range(n):
		if k == 0:
			score = 1
			last = 1
		elif a[k] == a[k - 1]:
			score += 1
			last = max(score, last)
		else:
			score = 1
	s[i] = last
for y in range(t):
	print(s[y])


for _ in range(int(input())):
	n = int(input())
	c = {}
	for x in map(int, input().split()):
		c[x] = c.get(x, 0) + 1
	print(max(c.values()))


for t in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	c = {}
	d = 0
	for i in range(n):
		if a[i] in c:
			c[a[i]] += 1
		else:
			c[a[i]] = 1
		d = max(d, c[a[i]])
	print(d)


import sys
from functools import reduce
from collections import Counter
import time
import datetime
import math

def ip():
	return int(sys.stdin.readline())

def sip():
	return input()

def mip():
	return map(int, sys.stdin.readline().split())

def mips():
	return map(str, sys.stdin.readline().split())

def lip():
	return list(map(int, sys.stdin.readline().split()))

def slip():
	return list(map(str, sys.stdin.readline().split()))

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.insert(i, arr)
	return lst

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def minJumps(arr, n):
	jumps = [0 for i in range(n)]
	if n == 0 or arr[0] == 0:
		return float('inf')
	jumps[0] = 0
	for i in range(1, n):
		jumps[i] = float('inf')
		for j in range(i):
			if i <= j + arr[j] and jumps[j] != float('inf'):
				jumps[i] = min(jumps[i], jumps[j] + 1)
				break
	return jumps[n - 1]

def dic(arr):
	return Counter(arr)

def check_prime(n):
	if n < 2:
		return False
	for i in range(2, int(n ** 0.5) + 1, 2):
		if n % i == 0:
			return False
	return True
t = ip()
while t:
	t -= 1
	n = ip()
	arr = lip()
	count = 1
	val = 1
	for i in range(1, n):
		if arr[i - 1] == arr[i]:
			count += 1
		elif arr[i - 1] != arr[i]:
			count = 1
		if count > val:
			val = count
	print(val)


s = int(input())
for i in range(s):
	n = int(input())
	list_sh = [int(item) for item in input().split(' ')]
	d = {}
	for shar in list_sh:
		if shar in d:
			d[shar] = d[shar] + 1
		else:
			d[shar] = 1
	max_val = max(d.values())
	print(max_val)


t = int(input())
while t > 0:
	n = int(input())
	hashMap = {}
	max = -999
	nums = input().split()
	for num in nums:
		freq = hashMap.get(num)
		freq = 1 if freq == None else freq + 1
		if freq > max:
			max = freq
		hashMap[num] = freq
	print(max)
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a += [-1]
	result = 0
	count = 0
	for i in range(n):
		if a[i] == a[i + 1]:
			count += 1
		else:
			result = max(result, count)
			count = 0
	print(result + 1)


q = int(input())
for i in range(q):
	w = int(input())
	a = list(map(int, input().split()))[:w]
	r = {}
	for e in a:
		if e not in r:
			r[e] = 0
		r[e] += 1
	x = r.values()
	print(max(x))


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	x = max(l, key=l.count)
	print(l.count(x))


q = int(input())
while q > 0:
	q -= 1
	n = int(input())
	l = input().split()
	d = {}
	for i in range(n):
		if l[i] not in d:
			d[l[i]] = 0
		d[l[i]] += 1
	ans = 1
	for i in d:
		ans = max(ans, d[i])
	print(ans)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	dp = [0] * (max(a) + 1)
	for _ in range(n):
		dp[a[_]] += 1
	print(max(dp))


z = int(input(''))
for i in range(0, z):
	y = int(input(''))
	for j in range(y):
		L = []
		max = 0
		L = input('').split(' ')
		for K in set(L):
			nb = L.count(K)
			if nb > max:
				max = nb
		print(max)
		break


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	(prev, now) = (0, 0)
	tmp = 0
	for i in map(int, input().split()):
		now = i
		if prev == now:
			tmp += 1
		else:
			if ans < tmp:
				ans = tmp
			tmp = 1
		prev = now
	if ans < tmp:
		ans = tmp
	print(ans)


t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	ans = 1
	x = 1
	for i in range(1, n, 1):
		if a[i] == a[i - 1]:
			x += 1
			ans = max(x, ans)
		else:
			x = 1
	print(ans)
	t = t - 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	ans = cnt = 1
	pre = 0
	for cur in a:
		if cur == pre:
			cnt += 1
			ans = max(cnt, ans)
		else:
			cnt = 1
		pre = cur
	print(ans)


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	count = 1
	b = list(set(a))
	for i in range(len(b)):
		c = a.count(b[i])
		count = max(count, c)
	print(count)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l1 = set(l)
	a = []
	for i in l1:
		a.append(l.count(i))
	print(max(a))


from sys import stdin as f

def get_max_number(A):
	number = 1
	max_number = 1
	for i in range(1, len(A)):
		if A[i] == A[i - 1]:
			number = number + 1
		else:
			if number > max_number:
				max_number = number
			number = 1
	return max(max_number, number)
t = int(f.readline())
for _ in range(t):
	n = int(f.readline())
	A = [int(i) for i in f.readline().strip().split()]
	number = get_max_number(A)
	print(number)


for _ in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	need = 1
	mx = 1
	for i in range(1, n):
		if s[i] == s[i - 1]:
			need += 1
		else:
			mx = max(mx, need)
			need = 1
	print(max(mx, need))


t = int(input())
for i in range(t):
	n = input()
	arr = list(map(int, input().split()))
	dict = {}
	for item in arr:
		if item in dict:
			dict[item] = dict[item] + 1
		else:
			dict[item] = 1
	print(max(dict.values()))


for _ in range(int(input())):
	n = int(input())
	a = [*map(int, input().split())]
	d = {}
	for i in a:
		if d.get(i) == None:
			d[i] = 1
		else:
			d[i] += 1
	ans = 0
	for i in d:
		op = d[i]
		if op > ans:
			ans = op
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	k = 1
	kmax = 1
	for j in range(1, len(arr)):
		if arr[j] == arr[j - 1]:
			k += 1
		else:
			kmax = max(k, kmax)
			k = 1
	print(max(k, kmax))


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	mapa = {}
	for i in range(n):
		if a[i] not in mapa:
			mapa[a[i]] = 1
		else:
			mapa[a[i]] += 1
	lst = set()
	for key in mapa:
		lst.add(mapa[key])
	lst = list(lst)
	lst.sort()
	count = 0
	for i in range(len(lst)):
		if i == 0:
			count += lst[i]
			continue
		count += lst[i] - count
	print(count)
t = int(input())
for q in range(t):
	solve()


import sys

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
for _ in range(int(input())):
	n = int(input())
	a = get_list()
	c = 0
	for i in set(a):
		c = max(c, a.count(i))
	print(c)


for i in range(int(input())):
	n = int(input())
	l = input().split()
	templ = [l.count(j) for j in l]
	print(max(templ))


from collections import Counter
for _ in [0] * int(input()):
	input()
	r = list(map(int, input().split()))
	print(max([i for i in Counter(r).values()]))


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	print(a.count(max(a, key=a.count)))


for i in range(int(input())):
	a = int(input())
	l = list(map(int, input().split()))
	s = set(l)
	c = 0
	for j in s:
		c = max(c, l.count(j))
	print(c)


from collections import Counter

def GetList():
	return list(map(int, input().split()))

def main():
	t = int(input())
	for num in range(t):
		n = int(input())
		balls = GetList()
		count = Counter(balls)
		print(max(count.values()))
main()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	(max_same, x) = (1, 1)
	for i in range(1, n):
		if a[i] == a[i - 1]:
			x += 1
			max_same = max(max_same, x)
		else:
			x = 1
	print(max_same)


for _ in range(int(input())):
	(Max, Dif) = (0, 0)
	N = int(input())
	X = list(map(int, input().split()))
	for i in range(1, N):
		if X[i] != X[i - 1]:
			Max = max(Max, Dif)
			Dif = 0
		else:
			Dif += 1
	print(max(Max, Dif) + 1)


for _ in range(int(input())):
	n = int(input())
	s = input().split()
	d = {}
	for i in s:
		d[i] = d.get(i, 0) + 1
	m = 0
	for i in d.values():
		if i > m:
			m = i
	print(m)


t = int(input())
for z in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	d = dict()
	for i in a:
		if i not in d:
			d[i] = 1
		else:
			d[i] += 1
	m = max(d, key=d.get)
	print(d[m])


import collections
cases = int(input())
while cases:
	cases -= 1
	num = int(input())
	arr = list(map(int, input().split()))
	occurence_count = collections.Counter(arr)
	x = occurence_count.most_common(1)[0][1]
	print(x)


t = int(input())
for t1 in range(0, t):
	n = int(input())
	l = list(map(int, input().split()))
	d = {}
	mx = 0
	for i in l:
		if i not in d:
			d[i] = 0
		d[i] += 1
	for i in d.items():
		mx = max(mx, i[1])
	print(mx)


t = int(input())
for i in range(t):
	n = int(input())
	num_dic = {}
	for num in map(int, input().split()):
		num_dic[num] = num_dic.get(num, 0) + 1
	print(max(num_dic.values()))


A = int(input())
B = []
for i in range(A):
	s = input()
	d = list(map(int, input().split()))
	B += [d]
for i in B:
	p = 0
	res = 0
	while p < len(i):
		res = max(res, i.count(i[p]))
		p += i.count(i[p])
	print(res)


from collections import Counter
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	ma = {}
	occurence_count = Counter(arr)
	x = occurence_count.most_common(1)[0]
	print(x[1])


for tt in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	used = [set() for i in range(150)]
	ans = 0
	for x in a:
		for i in range(150):
			if x not in used[i]:
				ans = max(ans, i + 1)
				used[i].add(x)
				break
	print(ans)


t = int(input())
l1 = []
for i in range(t):
	n = int(input())
	l = input().split()
	c = c1 = 1
	for j in range(n - 1):
		if l[j] == l[j + 1]:
			c += 1
		else:
			c = 1
		if c1 < c:
			c1 = c
	l1.append(c1)
for i in l1:
	print(i)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	count = 1
	prev = arr[0]
	mxc = 1
	for i in range(1, n):
		if arr[i] == prev:
			count += 1
		else:
			mxc = max(mxc, count)
			count = 1
			prev = arr[i]
	print(max(mxc, count))


from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	di = defaultdict()
	for i in a:
		if i in di:
			di[i] += 1
		else:
			di[i] = 1
	maxx = 0
	for l in di:
		maxx = max(maxx, di[l])
	print(maxx)


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	count = 0
	l = []
	s = set(a)
	s = list(s)
	for i in s:
		count = a.count(i)
		l.append(count)
	print(max(l))


import operator
for i in range(int(input())):
	n = int(input())
	l1 = list(map(int, input().split()))
	dic = {}
	for i in l1:
		if i in dic:
			dic[i] += 1
		else:
			dic[i] = 1
	sorted_d = dict(sorted(dic.items(), key=operator.itemgetter(1), reverse=True))
	for i in sorted_d:
		print(dic[i])
		break


def answer():
	c = [0] * 101
	for i in a:
		c[i] += 1
	return max(c)
for T in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(answer())


import sys, math
sys.setrecursionlimit(10 ** 6)
fastinput = sys.stdin.readline
fastout = sys.stdout.write
t = int(fastinput())
while t:
	t -= 1
	n = int(input())
	a = [0] * (n + 1)
	for i in input().split():
		a[int(i)] += 1
	print(max(a))


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().strip().split()))[:n]
	s = set(lst)
	x = []
	for i in s:
		a = lst.count(i)
		x.append(a)
	print(max(x))


t = int(input())
for _ in range(t):
	n = int(input())
	s = input().split()
	(m, ma) = (1, 1)
	for i in range(1, n):
		if s[i] != s[i - 1]:
			ma = max(m, ma)
			m = 1
		else:
			m += 1
	ma = max(ma, m)
	print(ma)


for _ in range(int(input())):
	n = int(input())
	freq = {}
	for num in map(int, input().split()):
		freq[num] = freq.get(num, 0) + 1
	print(max(freq.values()))


num = int(input())
for i in range(num):
	num1 = int(input())
	l = list(map(int, input().split()))
	d = {}
	for i in range(num1):
		d[l[i]] = l.count(l[i])
	k = d.values()
	print(max(k))


for _ in range(int(input())):
	n = input()
	l = list(map(int, input().split()))
	k = [0] * 101
	for i in l:
		k[i] += 1
	print(max(k))


t = int(input())
for _ in range(t):
	n = int(input())
	lst = input().split()
	lst = [int(i) for i in lst]
	dct = {}
	for i in lst:
		dct[i] = dct.get(i, 0) + 1
	mx = 1
	for i in dct:
		mx = max(mx, dct[i])
	print(mx)


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	elem = max(set(a), key=a.count)
	print(a.count(elem))


def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def solved(l):
	ans = 1
	counter = 1
	for i in range(1, len(l)):
		if l[i] == l[i - 1]:
			counter += 1
		else:
			ans = max(ans, counter)
			counter = 1
	ans = max(ans, counter)
	return ans
t = inp()
while t > 0:
	n = inp()
	l = inlt()
	print(solved(l))
	t -= 1


for _ in range(int(input())):
	n = int(input())
	m = 0
	a = list(map(int, input().strip().split()))
	z = list(set(a))
	for i in z:
		if a.count(i) > m:
			m = a.count(i)
	print(m)


t = int(input())
for i in range(t):
	n = int(input())
	arr = list((int(x) for x in input().split()))
	arr.sort()
	res = 1
	m = -1000000000
	for i in range(len(arr) - 1):
		if arr[i] == arr[i + 1]:
			res += 1
		else:
			m = max(m, res)
			res = 1
	m = max(m, res)
	print(m)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	d = {}
	for j in a:
		if j in d:
			d[j] += 1
		else:
			d[j] = 1
	max1 = 0
	for k in d:
		if d[k] > max1:
			max1 = d[k]
	print(max1)


def najpon(lista):
	k = 1
	i = 0
	while i < len(lista) - 1:
		t = 1
		while lista[i] == lista[i + 1]:
			t += 1
			if i == len(lista) - 2:
				break
			else:
				i += 1
		if t > k:
			k = t
		i += 1
	return k
n = int(input())
while n > 0:
	k = input()
	lis = input().split(' ')
	print(najpon(lis))
	n -= 1


cases = int(input())
for i in range(cases):
	n = input()
	list_of = list(map(int, input().split()))
	max_need = 0
	cur_num = 0
	cur_need = 0
	for each in list_of:
		if each != cur_num:
			cur_num = each
			if max_need < cur_need:
				max_need = cur_need
			cur_need = 0
		cur_need += 1
	if max_need < cur_need:
		max_need = cur_need
	print(max_need)


t = int(input())
for _ in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	arr = [0] * 101
	for i in l:
		arr[i] += 1
	print(max(arr))


t = int(input())
import math
while t > 0:
	t -= 1
	n = int(input())
	ar = [int(x) for x in input().split()]
	dt = {}
	for i in range(n):
		dt[ar[i]] = dt.get(ar[i], 0) + 1
	print(max(list(dt.values())))


def gt():
	return list(map(int, input().split()))

def run():
	ar = gt()
	l = 0
	r = 0
	ans = 1
	while l < len(ar):
		while r + 1 < len(ar) and ar[r + 1] == ar[l]:
			r += 1
		ans = max(ans, r - l + 1)
		l = r + 1
	print(ans)
exec('input();run();' * int(input()))


from collections import *
for u in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	m = 0
	d = defaultdict(int)
	for i in l:
		d[i] += 1
	for i in d:
		m = max(d[i], m)
	print(m)


from sys import stdin, stdout
t = int(input())
from collections import Counter
from math import sqrt, ceil

def factorials(n, r):
	slr = n
	dpr = r
	qrr = 1
	qs = 1
	mod = 10 ** 9 + 7
	for ip in range(slr - dpr + 1, slr + 1):
		qlr = qlr * ip % mod
	for ij in range(1, dpr + 1):
		qs = qs * ip % mod
	ans = qlr * modInverse(qs) % mod
	return ans

def ps(n):
	for ps in range(3, ceil(sqrt(n)) + 1, 2):
		while n % ps == 0:
			return False
	return True

def modInverse(b):
	qr = 10 ** 9 + 7
	return pow(b, qr - 2, qr)
for jj in range(t):
	ql = int(input())
	arr = [int(x) for x in input().strip().split()]
	qp = Counter(arr)
	ml = 1
	for ps in qp:
		ml = max(ml, qp[ps])
	print(ml)


import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
mod = 10 ** 9 + 7

def lcm(x, y):
	return x * y / gcd(x, y)

def fact(x, mod=mod):
	ans = 1
	for i in range(1, x + 1):
		ans = ans * i % mod
	return ans

def arr2D(n, m, default=0):
	return [[default for j in range(m)] for i in range(n)]

def arr3D(n, m, r, default=0):
	return [[[default for k in range(r)] for j in range(m)] for i in range(n)]

def sortDictV(x):
	return {k: v for (k, v) in sorted(x.items(), key=lambda item: item[1])}

class DSU:

	def __init__(self, length):
		self.length = length
		self.parent = [-1] * self.length

	def getParent(self, node, start):
		if node >= self.length:
			return False
		if self.parent[node] < 0:
			if start != node:
				self.parent[start] = node
			return node
		return self.getParent(self.parent[node], start)

	def union(self, node1, node2):
		parent1 = self.getParent(node1, node1)
		parent2 = self.getParent(node2, node2)
		if parent1 == parent2:
			return False
		elif self.parent[parent1] <= self.parent[parent2]:
			self.parent[parent1] += self.parent[parent2]
			self.parent[parent2] = parent1
		else:
			self.parent[parent2] += self.parent[parent1]
			self.parent[parent1] = parent2
		return True

	def getCount(self, node):
		return -self.parent[self.getParent(node, node)]

def exact(num):
	if abs(num - round(num)) <= 10 ** (-9):
		return round(num)
	return num

def solve(n, lst):
	cnt = {}
	for i in lst:
		if cnt.get(i) == None:
			cnt[i] = 0
		cnt[i] += 1
	return max(list(cnt.values()))
for _ in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	print(solve(n, lst))


for _ in range(int(input())):
	n = int(input())
	s = input().split()
	a = 0
	b = 0
	c = 0
	for i in range(n):
		if i == 0:
			a = s[i]
			b = 1
		elif s[i] == a:
			b += 1
		else:
			c = max(c, b)
			a = s[i]
			b = 1
	print(max(c, b))


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	freq = {}
	res = 0
	for i in l:
		if i in freq:
			freq[i] += 1
		else:
			freq[i] = 1
	if len(freq) == 1:
		print(list(freq.values())[0])
	else:
		j = max(freq.values())
		print(j)


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	b = set(a)
	ans = []
	for i in b:
		ans.append(a.count(i))
	print(max(ans))


from collections import Counter
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	Tv = Counter(l)
	Keymax = max(Tv, key=Tv.get)
	print(Tv[Keymax])


import sys
import math
import bisect
import functools
from functools import lru_cache
from sys import stdin, stdout
from math import gcd, floor, sqrt, log, ceil
from heapq import heappush, heappop, heapify
from collections import defaultdict as dd
from collections import Counter as cc
from bisect import bisect_left as bl
from bisect import bisect_right as br

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
sys.setrecursionlimit(100000000)
intinp = lambda : int(input().strip())
stripinp = lambda : input().strip()
fltarr = lambda : list(map(float, input().strip().split()))
intarr = lambda : list(map(int, input().strip().split()))
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
MOD = 1000000007
num_cases = intinp()
for _ in range(num_cases):
	n = intinp()
	arr = intarr()
	c = cc(arr)
	print(max(c.values()))


for s in [*open(0)][2::2]:
	l = [*map(int, s.split())]
	print(max((l.count(x) for x in l)))


for _ in range(int(input())):
	n = int(input())
	L = [int(i) for i in input().split()]
	frequency = {}
	for no in L:
		if no in frequency:
			frequency[no] += 1
		else:
			frequency[no] = 1
	maxi = 0
	for (key, val) in frequency.items():
		if val >= maxi:
			maxi = val
	print(maxi)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if len(list(set(a))) == 1:
		print(n)
	else:
		c = 1
		ans = 0
		for i in range(n - 1):
			if a[i] == a[i + 1]:
				c += 1
			else:
				c = 1
			ans = max(ans, c)
		print(ans)


for i in range(int(input())):
	n = int(input())
	balls = tuple(map(int, input().split()))
	balls_count = []
	tmp = -1
	for j in balls:
		if tmp != j:
			balls_count.append(balls.count(j))
			tmp = j
	print(max(balls_count))


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	color = 1
	c = 0
	for i in range(1, n):
		if l[i] == l[i - 1]:
			if c == 0:
				color += 1
			else:
				c -= 1
		else:
			c = color - 1
	print(color)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = set(l)
	d = []
	for i in s:
		x = l.count(i)
		d.append(x)
	print(max(d))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	d = {}
	for i in a:
		if i in d:
			d[i] += 1
		else:
			d[i] = 1
	c = []
	for i in d:
		c.append(d[i])
	print(max(c))


test_cases = int(input())
for test_case in range(1, test_cases + 1):
	n = int(input())
	n_list = [int(j) for j in input().split(' ')]
	answer = 0
	current_streak = 1
	for i in range(1, n):
		if n_list[i] != n_list[i - 1]:
			answer = max(current_streak, answer)
			current_streak = 1
		else:
			current_streak += 1
	answer = max(current_streak, answer)
	print(answer)


for _ in range(int(input())):
	n = int(input())
	A = [int(i) for i in input().split()]
	B = set(A)
	s = A[0]
	freq = 1
	max = 1
	for j in range(1, n):
		if A[j] == s:
			freq += 1
		else:
			if freq > max:
				max = freq
			freq = 1
			s = A[j]
	if freq > max:
		max = freq
	print(max)


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(item) for item in input().split()]
	d = {}
	for j in range(len(a)):
		if a[j] in d:
			d[a[j]] += 1
		else:
			d[a[j]] = 1
	print(max(d.values()))


from sys import stdin
from collections import Counter
for t in range(int(stdin.readline())):
	n = input()
	arr = list(map(int, stdin.readline().split()))
	x = Counter(arr)
	maxim = 1
	for i in x:
		if x[i] > maxim:
			maxim = x[i]
	print(maxim)


test_case = int(input())
for i in range(test_case):
	num = int(input())
	list_ = list(map(int, input().split()))
	l = []
	for i in range(num):
		l.append(list_.count(list_[i]))
	print(max(l))