from itertools import product n = int(input()) tot = int(input()) a = list(map(int, input().split())) for p in product(range(2), repeat=n-1): cur = a[0] for i in range(n - 1): if not p[i]: cur += a[i + 1] else: cur *= a[i + 1] if cur == tot: print(''.join('+' if not op else '*' for op in p)) break