For a string , let be the number of distinct, non-empty substrings of . For example, f(\mathtt{aab}) = 5: the substrings are , , , , .
You are given an integer and a binary string of length n-2, indexed as t_1, \ldots, t_{n-2}.
We call a string of length Skibidi if sliding a window of length across gives n-2 windows, and for every 1 \le i \le n-2 the -th window matches t_i:
Determine the lexicographically smallest Skibidi string consisting of lowercase English letters.
^\daggerModulo operation. For positive integers and , u \bmod v denotes the remainder when is divided by .
For example, for s = \mathtt{aabcba} we have important ! : must solve with O(3^6*n) dp
so t = \mathtt{1010}, i.e. t_1=1,\ t_2=0,\ t_3=1,\ t_4=0.
The first line contains a single integer (1 \le T \le 10^4) — the number of test cases.
The first line of each test case contains an integer (3 \le n \le 2 \cdot 10^5) — the length of the required string.
The second line of each test case contains a binary string of length n-2 (t_i \in \{\mathtt{0}, \mathtt{1}\}).
It is guaranteed that the sum of over all test cases does not exceed 2 \cdot 10^5.
For each test case, print the lexicographically smallest string consisting of lowercase English letters that satisfies the conditions.
Example 1
For the first test case, s = \mathtt{aabcba}:
i = 1: has f = 5 distinct non-empty substrings, so f \bmod 2 = 1.
i = 2: has f = 6 distinct non-empty substrings, so f \bmod 2 = 0.
i = 3: has f = 5 distinct non-empty substrings, so f \bmod 2 = 1.
i = 4: has f = 6 distinct non-empty substrings, so f \bmod 2 = 0.
Hence the resulting is , as required.
For the second test case, s = \mathtt{abcbaa}:
i = 1: has f = 6 distinct non-empty substrings, so f \bmod 2 = 0.
i = 2: has f = 5 distinct non-empty substrings, so f \bmod 2 = 1.
i = 3: has f = 6 distinct non-empty substrings, so f \bmod 2 = 0.
i = 4: has f = 5 distinct non-empty substrings, so f \bmod 2 = 1.
Hence the resulting is , as required.
For the third test case, s = \mathtt{aaabcaa}:
i = 1: has f = 3 distinct non-empty substrings, so f \bmod 2 = 1.
i = 2: has f = 5 distinct non-empty substrings, so f \bmod 2 = 1.
i = 3: has f = 6 distinct non-empty substrings, so f \bmod 2 = 0.
i = 4: has f = 6 distinct non-empty substrings, so f \bmod 2 = 0.
i = 5: has f = 5 distinct non-empty substrings, so f \bmod 2 = 1.
Hence the resulting is , as required.
Subtask ( points) : (t=\mathtt{00000 \ldots 0})
Subtask ( points) : (t=\mathtt{11111\ldots 1})
Subtask ( points) : (1 \le \sum n \le 1000)
Subtask ( points) : (1 \le \sum n \le 10^4)
Subtask ( points): No additional constraints