N = int(input()) T = int(input()) A = list(map(int, input().split())) tmp = [] def dfs(i, val): if i == N: if val == T: ans = "".join(tmp) print(ans.replace("0", "+").replace("1", "*")) return True return False if val + A[i] <= T: tmp.append("0") if dfs(i + 1, val + A[i]): return True tmp.pop() if val * A[i] <= T: tmp.append("1") if dfs(i + 1, val * A[i]): return True tmp.pop() return False dfs(1, A[0])