n = int(input()) total = int(input()) A = list(map(int,input().split())) inf = 1<<60 dp = [inf]*(total+1) dp[0] = 0 for a in A: ndp = [inf]*(total+1) for j in range(total+1): if dp[j] == inf: continue if a+j <= total: ndp[a+j] = min(ndp[a+j],dp[j]<<1) if a*j <= total: ndp[a*j] = min(ndp[a*j],1+dp[j]<<1) dp = ndp ans = [] for i in range(1,n)[::-1]: if dp[total] >> i & 1: ans.append("*") else: ans.append("+") print(*ans,sep="")