#include <fstream>

using namespace std;

ifstream fin("easy.in");
ofstream fout("easy.out");

int m, n, k;
double p[10000];



bool calc(int x)
{
	int i;
	double pm = 0, pn = 0;

	for (i = x - m + 1; i <= x; i++) pm += p[i];
	for (i = x - n + 1; i <= x; i++) pn += p[i];

	return pm / m > pn / n;
}



int main()
{
	int i;
	bool prev, curr;

	fin >> m >> n >> k;
	for (i = 0; i < k; i++) fin >> p[i];

	for (i = n - 1; i < k; i++) {
		curr = calc(i);
		if (i == n - 1 || prev != curr) {
			fout << (curr ? "BUY" : "SELL") << " ON DAY " << i + 1 << '\n';
		}
		prev = curr;
	}

	return 0;
}