#include <stdio.h>
int main(void){
  int K,a,b;
  char buf[1000];
  fgets(buf, sizeof(buf), stdin);
  sscanf(buf, "%d\n", &K);
  fgets(buf, sizeof(buf), stdin);
  sscanf(buf, "%d %d\n", &a, &b);
  int i = a;
  for(i;i<=b+1; i++){
    if(i==b+1){
      printf("NG");
    }
    if(i%K==0){
      printf("OK");
    }
  }
  return 0;
}