using System; using System.Linq; using System.Collections.Generic; namespace Yuki { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int total = int.Parse(Console.ReadLine()); int[] a = Console.ReadLine().Split().Select(s => int.Parse(s)).ToArray(); var lii = new List(); var lis = new List(); lii.Add(a[0]); lis.Add(""); for (int i = 1; i < a.Length; i++) { var lii2 = new List(); var lis2 = new List(); for (int j = 0; j < lii.Count; j++) { int s = lii[j] + a[i]; if (s <= total) { lii2.Add(s); lis2.Add(lis[j] + "+"); } int p = lii[j] * a[i]; if (p <= total) { lii2.Add(p); lis2.Add(lis[j] + "*"); } } lii = lii2; lis = lis2; } var ans = new List(); for (int i = 0; i < lii.Count; i++) { if (lii[i] == total) { ans.Add(lis[i]); } } ans.Sort(); ans.Reverse(); Console.WriteLine(ans[0]); } } }