D. Thomas Trade
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

You have a set $$$S$$$ containing the first $$$n$$$ powers of $$$2$$$. However, Thomas tampered with your set and negated some of its values. For example, for $$$n=4$$$, $$$S = \{1, 2, 4, 8\}$$$, and Thomas could negate the $$$2$$$ and $$$4$$$ to turn $$$S$$$ into $$$\{1, -2, -4, 8\}$$$.

You are given a positive integer $$$k$$$. Express $$$k$$$ as the sum of some subset of $$$S$$$, or state that this is impossible.

Input

The first line of the input contains a single integer $$$t$$$ ($$$1\le t\le 10^4$$$) — the number of test cases.

The first line of each test case contains two integers $$$n$$$ and $$$k$$$ ($$$1\le n \le 30$$$, $$$1 \le k \lt 2^n$$$) — the size of $$$S$$$ and the target sum, respectively.

The next line consists of $$$n$$$ characters $$$+$$$ and $$$-$$$, where the $$$i$$$-th character is $$$-$$$ if Thomas negated $$$2^{i-1}$$$ and $$$+$$$ otherwise.

Output

For each test case, if there is no subset adding up to $$$k$$$, print $$$-1$$$.

Otherwise, print a string of $$$n$$$ characters $$$\texttt{#}$$$ and $$$\texttt{.}$$$, where the $$$i$$$-th character is $$$\texttt{#}$$$ if you include the $$$i$$$-th element in the subset, and $$$\texttt{.}$$$ otherwise.

If there are multiple solutions, you can print any.

Example
Input
6
4 2
+--+
3 5
---
6 43
++++++
7 9
--+--+-
1 1
-
5 4
--+--
Output
.###
-1
##.#.#
######.
-1
..#..
Note

In the first test case, $$$S = \{1, -2, -4, 8\}$$$ and $$$k=2$$$. We can choose the subset $$$\{-2, -4, 8\}$$$, which adds up to $$$2$$$.

In the second test case, $$$S = \{-1, -2, -4\}$$$. Since all elements of $$$S$$$ are negative, we cannot choose a subset of $$$S$$$ that adds up to $$$k=5$$$.