import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int total = Integer.parseInt(br.readLine()); String[] tmpA = br.readLine().split(" "); int[] a = new int[tmpA.length]; for (int i = 0; i < n; i++) { a[i] = Integer.parseInt(tmpA[i]); } String now[] = new String[total + 1]; String next[] = new String[total + 1]; int no1 = a[0]; now[no1] = ""; for (int i = 1; i < n; i++) { for (int j = 0; j <= total; j++) { if (now[j] == null) { continue; } int nextAdd = j + a[i]; int nextTime = j * a[i]; if (nextAdd <= total) { next[nextAdd] = compare(next[nextAdd], now[j] + "+"); } if (nextTime <= total) { next[nextTime] = compare(next[nextTime], now[j] + "*"); } } now = next.clone(); next = new String[total + 1]; } System.out.println(now[total]); } private static String compare(String setted, String next) { if (setted == null) { return next; } if (setted.compareTo(next) < 0) { return next; } return setted; } }