
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <cstring>
using namespace std;
const int N=1e4+;
int a[N];
bool dp[];
vector < vector <int> > ans ();
int n,m;
bool cmp (vector<int> x, vector<int> y) {// 不用考虑x与y得大小 因为至少一个数不同 或者全部相同
for (int i=;i<x.size();i++) {
if (x[i]<y[i]) return ;
else if (x[i]>y[i]) return ;
}
return ;
}
int main ()
{
scanf ("%d %d",&n,&m);
for (int i=;i<=n;i++)
scanf ("%d",&a[i]);
sort (a+,a++n);
dp[]=;
for (int i=;i<=n;i++) {
for (int j=m;j>=a[i];j--) {
if (dp[j-a[i]]) {
vector <int> tmp=ans[j-a[i]];
tmp.push_back(i);
if (!dp[j]) { dp[j]=;ans[j]=tmp; }
else if (cmp (tmp,ans[j])) ans[j]=tmp;
}
}
}
if (!dp[m]) printf ("No Solution\n");
else {
printf ("%d",a[ans[m][]]);
for (int i=;i<ans[m].size();i++)
printf (" %d",a[ans[m][i]]);
printf ("\n");
}
return ;
}