#include <stdio.h>

int m, n, k;
double P[10001];

double Ert(int days, int day){
	double res = 0;
	for (int i = day - days + 1; i <= day; i++) {
		res += P[i];
	}
	return res/days;
}

int main(){
	int i, last;
	double curm ,curn;
	freopen("easy.in", "r", stdin);
	freopen("easy.out", "w", stdout);
	scanf("%d %d %d\n", &m, &n, &k);
	last = -1;
	for (i=1; i<=k; i++) {
		scanf("%lf", &P[i]);
	}
	for (i=n; i<=k; i++) {
		curm = Ert(m, i);
		curn = Ert(n, i);
		if (curm > curn) {
			if (i == n || last != 1) printf("BUY ON DAY %d\n", i);
			last = 1;
		}
		else {
			if (i == n || last != 0) printf("SELL ON DAY %d\n", i);
			last = 0;
		}
	}
	return 0;
}
