import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random, core.bitop; import std.string, std.regex, std.conv, std.stdio, std.typecons; void main() { auto n = readln.chomp.to!size_t; auto t = readln.chomp.to!int; auto ai = readln.split.map!(to!int); string rec(int t, string ops) { auto opsLen = ops.length; if (n - opsLen == 1) return t == ai[0] ? ops : "E"; auto a = ai[n - opsLen - 1]; if (t > a) { auto r1 = rec(t - a, "+" ~ ops); if (r1 != "E") return r1; } if (t % a == 0) { auto r2 = rec(t / a, "*" ~ ops); if (r2 != "E") return r2; } return "E"; } writeln(rec(t, "")); }