N = int(input()) total = int(input()) A = list(map(int,input().split())) dp = [[10**18]*(total+1) for _ in range(N)] dp[0][A[0]] = 0 for i in range(N-1): a = A[i+1] for j in range(1,total+1): if j*a <= total: dp[i+1][j*a] = min(dp[i+1][j*a], dp[i][j]+(1<<(N-2-i))) if j+a <= total: dp[i+1][j+a] = min(dp[i+1][j+a], dp[i][j]) print("".join(["*" if (dp[N-1][total]>>i)&1 else "+" for i in range(N-2,-1,-1)]))