import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int T = sc.nextInt(); int[] A = new int[N]; for(int i = 0; i < N; i++){ A[i] = sc.nextInt(); } String[] DP = new String[T + 1]; String[] next_DP = new String[T + 1]; DP[A[0]] = ""; for(int i = 1; i < N; i++){ Arrays.fill(next_DP, null); for(int j = T - A[i]; j >= 0; j--){ if(DP[j] == null){ continue; } final String next_str = DP[j] + "+"; if(next_DP[j + A[i]] == null){ next_DP[j + A[i]] = next_str; }else if(next_str.compareTo(next_DP[j + A[i]]) < 0){ next_DP[j + A[i]] = next_str; } } for(int j = T / A[i]; j > 0; j--){ if(DP[j] == null){ continue; } final String next_str = DP[j] + "*"; if(next_DP[j * A[i]] == null){ next_DP[j * A[i]] = next_str; }else if(next_str.compareTo(next_DP[j * A[i]]) > 0){ next_DP[j * A[i]] = next_str; } } String[] tmp = DP; DP = next_DP; next_DP = tmp; } System.out.println(DP[T]); } }