You are given two integers C,KC,K and an array of NN integers a1,a2,...,aNa1,a2,...,aN. It is guaranteed that the value of aiai is between 11 to CC.
We define that a continuous subsequence al,al+1,...,ar(l≤r)al,al+1,...,ar(l≤r) of array a is a good subarray if and only if the following condition is met:
∀x∈[1,C],∑i=lr[ai=x]=0or∑i=lr[ai=x]≥K∀x∈[1,C],∑i=lr[ai=x]=0or∑i=lr[ai=x]≥K
It implies that if a number appears in the subarray, it will appear no less than KKtimes.
You should find the longest good subarray and output its length. Or you should print 00 if you cannot find any.
Input
There are multiple test cases.
Each case starts with a line containing three positive integers N,C,K(N,C,K≤105)N,C,K(N,C,K≤105).
The second line contains NN integer a1,a2,...,aN(1≤ai≤C)a1,a2,...,aN(1≤ai≤C).
We guarantee that the sum of NNs, the sum o