import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); try { int N = Integer.parseInt(read.readLine()); int total = Integer.parseInt(read.readLine()); boolean[] flag = new boolean[N - 1]; String[] box = read.readLine().split(" "); int[] num = new int[N]; for (int i = 0; i < N; ++i) { num[i] = Integer.parseInt(box[i]); } int count = (int) Math.pow(2, N - 1); for (int i = 0; i < count; ++i) { int pro = num[0]; for (int j = 0; j < N - 1; ++j) { if (flag[j] == false) { pro += num[j + 1]; } else { pro *= num[j + 1]; } } if (total == pro) { for (int j = 0; j < N - 1; ++j) { if (flag[j] == false) { System.out.print('+'); } else { System.out.print('*'); } } break; } else { int s = 0; while (flag[s]) { flag[s] = false; ++s; } flag[s] = true; } } } catch (Exception e) { e.printStackTrace(); } } }