#include<stdio.h>
int main(void){
  	int k;
  int a,b;
  int x;
  scanf("%d",&k);
  scanf("%d%d",&a,&b);
  while(k < b){
    	for(int i = 1; i <= k; i++){
			x = i*k;
          if(a <= x <= k){
            break;
            printf("OK");
          }else{
            printf("NG");
          }
        }
  }  