import java.util.*; public class Main_yukicoder10 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int total = sc.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); } String[][] dp = new String[n][total + 1]; dp[0][a[0]] = ""; for (int j = 1; j < n; j++) { for (int i = 1; i <= total; i++) { if (dp[j - 1][i] == null) { continue; } if (i * a[j] <= total) { String tmp = dp[j - 1][i] + '*'; if (dp[j][i * a[j]] != null && dp[j][i * a[j]].compareTo(tmp) > 0) { } else { dp[j][i * a[j]] = tmp; } } if (i + a[j] <= total) { String tmp = dp[j - 1][i] + '+'; if (dp[j][i + a[j]] != null && dp[j][i + a[j]].compareTo(tmp) > 0) { } else { dp[j][i + a[j]] = tmp; } } } } System.out.println(dp[n - 1][total]); sc.close(); } }