Problem: Let's call two strings and (both of length ) a bit similar if they have the same character in some position, i. e. there exists at least one such that .
You are given a binary string of length (a string of characters 0 and/or 1) and an integer . Let's denote the string as the substring of starting from the -th character and ending with the -th character (that is, ).
Let's call a binary string of length beautiful if it is a bit similar to all substrings of having length exactly ; that is, it is a bit similar to .
Your goal is to find the lexicographically smallest string that is beautiful, or report that no such string exists. String is lexicographically less than string if either is a prefix of (and ), or there exists such (), that , and for any () .
Input Format: The first line contains one integer () — the number of test cases. Each test case consists of two lines.
The first line of each test case contains two integers and (). The second line contains the string , consisting of characters (each character is either 0 or 1).
It is guaranteed that the sum of over all test cases does not exceed .
Output Format: For each test case, print the answer as follows:
- if it is impossible to construct a beautiful string, print one line containing the string NO (note: exactly in upper case, you can't print No, for example);
- otherwise, print two lines. The first line should contain the string YES (exactly in upper case as well); the second line — the lexicographically smallest beautiful string, consisting of characters 0 and/or 1.