#include #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define all(c) c.begin(),c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x,y) x=min(x,y) #define chmax(x,y) x=max(x,y) using namespace std; typedef long long ll; ll dp[51][100001],inf=1e18; int main(){ int N,T; cin>>N>>T; rep(i,N+1) rep(j,T+1) dp[i][j]=inf; int a; cin>>a; dp[0][a]=0; rep(i,N-1){ cin>>a; rep(j,T+1){ if(dp[i][j]==inf) continue; if(j+a<=T) chmin(dp[i+1][j+a],dp[i][j]*2); if(j*a<=T) chmin(dp[i+1][j*a],dp[i][j]*2+1); } } ll v=dp[N-1][T]; string ans; rep(i,N-1){ ans+=(v%2 ? '*' : '+'); v/=2; } reverse(all(ans)); cout<