n = int(input()) t = int(input()) *a, = map(int,input().split()) dp = [-1]*(t+1) # +: 1 *: 0 dp[a[0]] = 0 for ai in a[1:]: ndp = [-1]*(t+1) for i,xi in enumerate(dp): if xi==-1: continue if i*ai <= t: ndp[i*ai] = max(ndp[i*ai], xi*2) if i+ai <= t: ndp[i+ai] = max(ndp[i+ai], xi*2+1) dp = ndp print("".join(["+" if dp[t]>>i&1 else "*" for i in range(n-2,-1,-1)]))