LearnPy Hub
← Arena
AdvancedRating 2000

Insert Operators to Hit a Target

Insert +, − or * between the digits (or nothing, to join digits into a longer number) so that the expression equals t. Numbers may not have leading zeros. Print all expressions in alphabetical order, or NONE.

Input

A digit string (length ≤ 9), then t.

Output

Lines.

Sample 1

Input
123
6
Output
1*2*3
1+2+3

Sample 2

Input
232
8
Output
2*3+2
2+3*2
solution.py
Output appears here
Insert Operators to Hit a Target · Python Arena problem · LearnPy Hub