#include using namespace std; int dn[55][100010]; int tot,N; int a[55]; char res[55]; int dfs(int x,int r){ if( r > tot ) return 0; if( dn[x][r]++ ) return 0; if( r == tot && x == N ){ cout << res << endl; exit(0); }else{ if( N == x ) return 0; res[x-1] = '+'; dfs(x+1,r+a[x]); res[x-1] = '*'; dfs(x+1,r*a[x]); } } int main(){ cin >> N >> tot; for(int i = 0 ; i < N ; i++) cin >> a[i]; dfs(1,a[0]); }