#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin>>N; ll num; cin>>num; vector A(N); for(int&x:A)cin>>x; vector> dp(N+1); for(int i=0;i<=N;++i) dp[i]=set(); dp[N].insert(num); for(int i=N;i>0;--i){ int x=A[i-1]; for(auto&y: dp[i]){ if(y-x>=0) dp[i-1].insert(y-x); if(y%x==0) dp[i-1].insert(y/x); } } assert(dp[0].count(0)); string ans = ""; int x=0; for(int n=1;n<=N;++n){ int y=A[n-1]; if(dp[n].count(x+y)){ x+=y; ans.push_back('+'); } else{ x *= y; ans.push_back('*'); } } cout<