src="https://vjudge.net/problem/description/6875?1493399564000" width="100%" height="1258px" frameborder="0" scrolling="no" style="box-sizing: inherit;">
#include <iostream>
#include <algorithm>
#include <map>
using namespace std;
int main()
{
int n,T;
while(cin>>n>>T){
int a[1000+5];
for(int i=0;i<n;i++)
cin>>a[i];
for(int i=0;i<T;i++){
if(n==1)
while(T--)
cout<<1<<endl;
else{
int max=-100,maxx;
for(int j=0;j<n;j++){
if(a[j]>max){
max=a[j]; maxx=j;
}
}
cout<<maxx+1<<endl;
int add=max/(n-1);
int left=max%(n-1);
a[maxx]=0; max=-1;
for(int k=0;k<n;k++)
{
if(k==maxx) continue;
if(left){
left--;
a[k]++;
}
a[k]+=add;
}
}
}
}
return 0;
}