import sequtils,strutils proc p2(i : int):int64= 1.int64 shl i var N = stdin.readline.parseInt T = stdin.readline.parseInt A = stdin.readline.split.map(parseInt) total : array[50,array[100001,int64]] i : int64 ans = "" total[0][A[0]] = p2(51) for n in 1.. 0 and j * A[n] <= T: total[n][j * A[n]] = max(total[n][j * A[n]], total[n - 1][j]) if total[n - 1][j] > 0 and j + A[n] <= T: total[n][j + A[n]] = max(total[n][j + A[n]], total[n - 1][j] + p2(51 - n)) for j in 1.. 0: ans &= "+" else: ans &= "*" echo ans