#include <stdio.h>
#include <math.h>
#include <stdlib.h>
double p[10100];


		#define EPS 1e-9
int m,n;
int prev = 0;
void check(double PN, double PM, int d)
{
	int dis=0;
	PN *=m;
	PM *=n;
	if(PN > PM)dis=1;
	if(PN < PM)dis=-1;
	//if(dis != 0 && prev != dis)
		if(dis == 1 && (prev==-1 || d==n))
			printf("SELL ON DAY %d\n", d);
		if(dis == -1 && (prev==1 || d==n))
			printf("BUY ON DAY %d\n", d);
	prev = dis;
}

int main()
{
	freopen("easy.in","rt",stdin);
	freopen("easy.out","wt",stdout);
	
	int k;
	scanf("%d %d %d", &m,&n,&k);
	int i;
	double PN=0, PM=0;
	double tmp;
	for(i=1;i<=n;i++){
		scanf("%lf", &tmp);
		//tmp += EPS;
		p[i] = tmp;
		PN += p[i];
		if(i>(n-m))
			PM += p[i];
	}
	check(PN,PM,i-1);
	for(i=n+1;i<=k;i++){
		scanf("%lf", &tmp);
		p[i] = tmp;
		PN -= p[i-n];
		PM -= p[i-m];
		PN += p[i];
		PM += p[i];
		check(PN, PM, i);
	}

	return 0;
}