import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int K = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int n = A;
        
        for(int i = A; i < B + 1 ; i++){
            if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            }
        }
    
    }    
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int K = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int n = A;
        
        for(int i = A; i < B + 1 ; i++){
            if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            }
        }
    
    }    
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int K = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int n = A;
        
        for(int i = A; i < B + 1 ; i++){
            if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            }
        }
    
    } main {
        Scanner sc = new Scanner(System.in);
        int K = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int n = A;
        
        for(int i = A; i < B + 1 ; i++){
            if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            }
        }
    
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int n = A; n A for(int i = A; i < B + 1 ; i++){
            if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            }
        } int i = A; int i = A; i A i < B + 1 i B + 1 B 1 i++ i++ i {
            if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            }
        } {
            if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            }
        } if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            } i % K == 0 i % K i K 0 {
                System.out.println("OK");
                i = B + 1;
            } System.out.println("OK") System.out.println System.out System System.out "OK" i = B + 1 i B + 1 B 1 {
            if(n == B){
                System.out.println("NG");
            }
            n++;
            } if(n == B){
                System.out.println("NG");
            } n == B n B {
                System.out.println("NG");
            } System.out.println("NG") System.out.println System.out System System.out "NG" n++ n String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int K = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int n = A;
        
        for(int i = A; i < B + 1 ; i++){
            if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            }
        }
    
    }    
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int K = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int n = A;
        
        for(int i = A; i < B + 1 ; i++){
            if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            }
        }
    
    }    
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int K = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int n = A;
        
        for(int i = A; i < B + 1 ; i++){
            if(i % K == 0){
                System.out.println("OK");
                i = B + 1;
            }else{
            if(n == B){
                System.out.println("NG");
            }
            n++;
            }
        }
    
    }    
}