#include using namespace std; map dp[50]; bool comp(string a,string b){ while(a.size()>0&&b.size()>0){ if(a[0]==b[0]){ a.erase(a.begin(),a.begin()+1); b.erase(b.begin(),b.begin()+1); } else if(a[0]=='*') return true; else if(b[0]=='*') return false; } return false; } int main(){ int n,t; cin>>n>>t; vector a(n); for(int i=0;i>a[i]; dp[0][a[0]]=""; for(int i=1;ifirst; string s=it->second; if(num+a[i]<=t){ auto nxt=dp[i].find(num+a[i]); if(nxt==dp[i].end()) dp[i][num+a[i]]=s+'+'; else if(comp(nxt->second,s+'+')) dp[i][num+a[i]]=s+'+'; } if(num*a[i]<=t){ auto nxt=dp[i].find(num*a[i]); if(nxt==dp[i].end()) dp[i][num*a[i]]=s+'*'; else if(comp(nxt->second,s+'*')) dp[i][num*a[i]]=s+'*'; } } } cout<