Each input will begin with a line with a single integer c (1 ≤ c ≤ 2·105), which is the number of cases you must solve.
Each of the next c lines will contain an integer k and a string s (1 ≤ k ≤ |s| ≤ 105, s ∈ [a−z]*), separated by a space.
The total length of all strings in the input will be at most 106.