#include <stdio.h>

double a[10000], pn[10000], pm[10000];

int main() {
	int n, m, k, i;
	
	fclose(stdin);
	fopen("easy.in", "r");
	fclose(stdout);
	fopen("easy.out", "w");

	scanf("%d %d %d", &m, &n, &k);
	for (i = 0; i < k; i++) scanf("%lf", &a[i]);
	pn[n - 1] = 0;
	for (i = 0; i < n; i++)
		pn[n - 1] += a[i];
	pn[m - 1] = 0;
	for (i = 0; i < m; i++)
		pm[m - 1] += a[i];
	for (i = n; i < k; i++)
		pn[i] = pn[i - 1] + a[i] - a[i - n];
	for (i = m; i < k; i++)
		pm[i] = pm[i - 1] + a[i] - a[i - m];
	for (i = 0; i < k; i++) {
		pn[i] /= n;
		pm[i] /= m;
	}
	if (pm[n - 1] > pn[n - 1]) printf("BUY ON DAY %d\n", n);
	if (pm[n - 1] < pn[n - 1]) printf("SELL ON DAY %d\n", n);
	for (i = n; i < k; i++) {
		if ((pm[i] > pn[i]) && (pm[i - 1] < pn[i - 1]))
			printf("BUY ON DAY %d\n", i + 1);
		if ((pm[i] < pn[i]) && (pm[i - 1] > pn[i - 1]))
			printf("SELL ON DAY %d\n", i + 1);
	}
	return 0;
}