Keypad Problem

Back in the Moscow artisan market, Mr. Ed bought an antique calculator which he really wanted to show to his pals. When he came back, he noticed that the keypad of the calculator is incredibly strange! Instead of having the usual keys from 0 to 9, this weird calculator has n different numeric keys and three extra keys with the operators ‘+’ (plus), ‘-’ (minus) and ‘=’ (equals). The i-th key has a number ki labeled on it, meaning that by pressing this key, the number ki is showed on the calculator’s screen. If there is some other number currently displayed on the screen, it is replaced by ki. As you may notice, this is pretty impractical, but Mr. Ed is clever and knows that in order to display a number not labeled in the keypad, he can make some additions and subtractions of the available numbers. For example, suppose Mr. Ed wants to display the number 7 and the available numeric keys of the keypad are 1, 3 and 5. Our friend could press the third key (with label 5), then press the ‘+’ key (to add another number) followed by the second key (adding 3), press the ‘-’ and first key (in order to subtract 1) and finally get the result of the operations by pressing the ‘=’ key, summing up the number 7. Mr. Ed wants to display the number r in the calculator’s screen, but he is not even sure he can achieve that. Please write a program that tells Mr. Ed if he can display number r and, in case it is possible, shows how to add up r by pressing several keys of the keypad. Input The input will contain several test cases (up to 100). The first line of each test contains 2 integers n and r: the number of numeric keys in the keypad and the integer Mr. Ed wants to display (1 ≤ n ≤ 50 and 1 ≤ |r| ≤ 1018). The next line contains n integers; the i-th integer represents the number ki labeled in the i-th numeric key (1 ≤ ki ≤ 20, 000). There will be no two keys with the same ki. The last test case is followed by a single line containing 2 zeroes. Output For each test case, if it is impossible to display number r print ‘Stupid keypad!’ If Mr. Ed can display r, print n integers: the i-th integer represents how many times you need to add (if the number is positive) or subtract (if the number is negative) number ki in order to display r. See format below for details. Please notice Mr. Ed can press a single key as many times as he like, possibly leading to multiple correct solutions. Any correct solution you print will be accepted. Sample Input 37 135 13 6 00 Sample Output Case #1: -1 1 1 Case #2: Stupid keypad!