#include <iostream>
#include <fstream>
#include<climits>
using namespace std;

ifstream fin("secventa.in");
ofstream fout("secventa.out");
int n, k, a[100005], s[100005];


int main()
{
    int st=0,dr=0,smin = INT_MAX;
	fin >> n >> k;
	for(int i=1;i<=n;i++)
		{
		    fin >> a[i];
		    s[i] = s[i-1]+a[i];
		}

   /* for(int i=k;i<=n;i++)
        fout<<s[i]-s[i-k]<<" ";
    fout<<endl;
    */
	for(int i=k;i<=n;i++)
		if(s[i]-s[i-k] < smin)
			{
			    smin = s[i]-s[i-k];
			    st = i-k+1;
			    dr = i;
			}
	for(int i=st ; i<=dr ; i++)
		fout << a[i] << " ";
	return 0;
}

