#include <fstream.h>

double P(double *,int,int);

int main()
{

	ifstream fin("easy.in");
	ofstream fout("easy.out");
	int n,m,i,k;
	double *mas,pm,pn;

	fin>>m>>n>>k;
	mas=new double [k+1];

	for(i=1;i<=k;i++)
		fin>>mas[i];

	for(i=n;i<=k;i++)
	{
		pm=P(mas,i-m+1,i);
		pn=P(mas,i-n+1,i);
		if(pm>pn)
		{
			fout<<"BUY ON DAY "<<i<<endl;
			break;
		}
	}
	for(i=n;i<=k;i++)
	{
		pm=P(mas,i-m+1,i);
		pn=P(mas,i-n+1,i);
		if(pm<pn)
		{
			fout<<"SELL ON DAY "<<i<<endl;
			break;
		}
	}

	return 0;
}


double P(double *mas,int l,int h)
{
	double avg=0;
	int i;
	for(i=l;i<h;i++)
		avg+=mas[i];

	return avg/(h-l);
}
