Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
A. Add Plus Minus Sign

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputAquaMoon has a string $$$a$$$ consisting of only $$$0$$$ and $$$1$$$. She wants to add $$$+$$$ and $$$-$$$ between all pairs of consecutive positions to make the absolute value of the resulting expression as small as possible. Can you help her?

Input

The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 2\,000$$$) – the number of test cases. The description of test cases follows.

The first line of each test case contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of $$$a$$$.

The second line of each test case contains a string $$$a$$$ of length $$$n$$$, consisting of only $$$0$$$ and $$$1$$$.

Output

For each test case, output a string of length $$$n - 1$$$ consisting of $$$-$$$ and $$$+$$$ on a separate line. If there is more than one assignment of signs that produces the smallest possible absolute value, any of them is accepted.

Example

Input

3211501101510001

Output

- +-++ +++-

Note

In the first test case, we can get the expression $$$1 - 1 = 0$$$, with absolute value $$$0$$$.

In the second test case, we can get the expression $$$0 + 1 - 1 + 0 + 1 = 1$$$, with absolute value $$$1$$$.

In the third test case, we can get the expression $$$1 + 0 + 0 + 0 - 1 = 0$$$, with absolute value $$$0$$$.

Codeforces (c) Copyright 2010-2023 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Feb/08/2023 20:27:43 (i2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|