#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a vector compress(vector v){ sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end()); return v; } template map dict(const vector &v){ map res; for(Int i=0;i<(Int)v.size();i++) res[v[i]]=i; return res; } //INSERT ABOVE HERE signed main(){ Int n,s; cin>>n>>s; vector p(n); for(Int i=0;i>p[i]; vector > ans; if(n<=15){ for(Int b=0;b<(1< v; Int sum=0; for(Int i=0;i>i)&1) continue; v.emplace_back(i); sum+=p[i]; } if(sum==s) ans.emplace_back(v); } }else{ Int h=n/2; map > > mp; for(Int b=0;b<(1< v; Int sum=0; for(Int i=0;i>i)&1) continue; v.emplace_back(i); sum+=p[i]; } mp[sum].emplace_back(v); } for(Int b=0;b<(1<<(n-h));b++){ vector v; Int sum=0; for(Int i=0;i>i)&1) continue; v.emplace_back(h+i); sum+=p[h+i]; } for(auto u:mp[s-sum]){ vector w(v); for(Int x:u) w.emplace_back(x); ans.emplace_back(compress(w)); } } } ans=compress(ans); for(auto v:ans){ Int cnt=0; for(Int x:v){ if(cnt++) cout<<" "; cout<