#include typedef long long ll; using namespace std; ll INF = 1e17; int MOD = 1e9+7; ll dp[51][100010]; main(){ int N,T,A[50]; cin >> N >> T; for(int i = 0;i < N;i++)cin >> A[i]; fill(dp[0],dp[51],INF); dp[0][A[0]] = 0; for(int i = 1;i < N;i++){ for(int j = 0;j <= 100000;j++){ if(j+A[i] <= 100000) dp[i][j+A[i]] = min(dp[i-1][j],dp[i][j+A[i]]); if(j*A[i] <= 100000) dp[i][j*A[i]] = min(dp[i-1][j]+(1<<(N-i-1)),dp[i][j*A[i]]); } } for(int j = N-2;j >= 0;j--){ printf("%c%s",dp[N-1][T]&(1<