eolymp
bolt
Try our new interface for solving problems
Problems

Account Book

Account Book

Time limit 1 second
Memory limit 64 MiB

The FCC (Foundation for Combating Corruption) dismantled a major corruption scheme in Nlogonia. During the operation, several account books, with notes documenting the illicit transactions carried out by the scheme, were seized by FCC agents.

Each page on the account books contains some transactions (income or expense, in nilogos, the local currency of Nlogônia, whose symbol is N$) and the cash flow resulting from transaco tions on that page. For example, if a page recorded the following transactions: an income of N$ 7, an income of N$ 2, an expense of N$ 3, an income of N$ 1 and an expense of N$ 11, the cash flow on that page would be 7 + 2 - 3 + 1 - 11 = -4.

However, to obstruct the work of the police, the offenders did not record in their account books the type of each transaction (income or expense). In the example above, the page would contain only the numbers 7231 and 11(with no indication whether they were income or expense transactions). The cash flow for each page, however, was always recorded normally, with the signal (in this case, -4).

To guarantee that the offenders are convicted, prosecutors must be able to determine with certainty whether each transaction is an income or an expense. In the example above, transaction N$ 7 was certainly an income, and transaction N$ 11 was certainly an expense. But we cannot say anything about transactions N$ 2N$ 3, and N$ 1. Transactions N$ 2 and N$ 1 could have been income and in this case transaction N$ 3 would have been an expense; or N$ 1 and N$ 2 could have been expenses and in this case transaction N$ 3 would be an income.

Many account books have a relatively large number of pages, with many transactions, making it is difficult for the police to process all the information. Therefore, they need a program that performs the task efficiently.

Input data

The input consists of several test cases. The first line of a test case contains two integers N and F, indicating the number of transactions on the page (2 ≤ N ≤ 40) and cash flow for this page (-16000 ≤ F ≤ 16000). Each of the following N lines contains an integer T_i indicating the value of the i-th transaction (1 ≤ T_i ≤ 1000).

The last test case is followed by a line containing only two numbers zero separated by a space.

Output data

For each test case the input your program must print a single line with N characters. The i-th character must be '+', if it is possible determine with certainty that the i-th transaction is an income, '-', if it is possible to determine with certainty that the i-th operation is an expense, and '?', if it is impossible to determine with certainty the type of transaction. If the cash flow recorded in the page cannot be obtained from the transactions recorded in the page, your program must print a single line containing the character '*'.

Examples

Input example #1
5 7
1
2
3
4
5
4 15
3
5
7
11
5 12
6
7
7
1
7
0 0
Output example #1
?+??+
*
+??-?
Source Maratona de Programa¸c˜ao da SBC – ACM ICPC – 2010