#include <iostream>#include <cstdio>#include <cstring>using namespace std;int main(){int i,j,k,N,X,cnt,max,a[25],tag[55],loop = 1;while(scanf("%d",&N) != EOF){scanf("%d",&X);for(i = 0;i < 20;i ++)scanf("%d",&a[i]);memset(tag,0,sizeof(tag));max = N - X;cnt = 0;for(i = 0;i < 20;i ++){j = k = 0;while(j < N){if(tag[j] == 0)k ++;if(k == a[i]){tag[j] = 1;cnt ++;k = 0;}j ++;if(cnt == max)break;}if(cnt == max)break;}printf("Selection #%dn",loop++);for(i = 0;i < N;i ++)if(tag[i] == 0){printf("%d",i + 1);break;}i ++;for(;i < N;i ++)if(tag[i] == 0)printf(" %d",i + 1);printf("nn");}return 0;}


