#include <stdio.h>
int* array;
bool f(int n, int m, int i)
{
	__int64 s1=0, s2 = 0;
	int j;
	for(j=i-n+1; j < i-m+1; j++)
		s1 += array[j-1];
	for(; j <= i; j++) 
		s2 += array[j-1];
	return (s1+s2)/n > s2/m;
}

int main()
{
	FILE *in, *out;
	in = fopen("easy.in", "rt");
	int m, n, k, i;
	fscanf(in, "%d%d%d", &m, &n, &k);
	array = new int[k];
	for(i=0; i<k; i++){
		float a;
		fscanf(in, "%f", &a);
		array[i] = a*100+0.5;
	}
	fclose(in);
	out = fopen("easy.out", "wt");
	for(i=n; i <= k; i++){
		if(f(n, m, i)){
			if(i== n || !f(n, m, i-1))
				fprintf(out, "BUY ON DAY %d\n", i);
		}else if(i==n || f(n, m, i-1))
			fprintf(out, "SELL ON DAY %d\n", i);
	}
	fclose(out);
	return 0;
}