#include <assert.h>
#include <math.h>
#include <stdio.h>

#define for(what) if (0) ; else for(what)
#define EPS 1e-8

int m, n, k;
double p[20000], s[20000];

int main()
{
  freopen("easy.in","rt",stdin);
  freopen("easy.out","wt",stdout);

  scanf("%d%d%d",&m,&n,&k);
  for (int i=0;i<k;i++)
  {
    scanf("%lf",&(p[i]));
    s[i] = p[i];
    if (i)
      s[i] += s[i-1];
  }

  double cur = 0, prev;
  for (int i=n-1;i<k;i++)
  {
    int s0 = s[i];
    if (i>=n)
      s0 -= s[i-n];
    int s1 = s[i]-s[i-m];
    prev = cur;
    cur = s1*n-s0*m;
    assert(fabs(cur)>EPS);
    if (cur>EPS)
      cur = 1;
    else
      cur = -1;
    if (fabs(prev-cur)>EPS)
    {
      if (cur==1)
        printf("BUY ON DAY %d\n",i+1);
      else
        printf("SELL ON DAY %d\n",i+1);
    }
  }

  return 0;
}