/**
 * Created by Odeen on 19.09.2014.
 */
import java.util.ArrayList;
import java.util.Arrays;

import java.util.List;

import ru.ifmo.testlib.*;
import ru.ifmo.testlib.Outcome.Type;

public class Check implements Checker {

	@Override
    public Outcome test(InStream inf, InStream ouf, InStream ans) {
        int sum = inf.nextInt();
        int n = inf.nextInt();
        
        try {
        	String my = ans.nextToken();
        	String thier = ouf.nextToken();
        	my = my.trim();
        	thier = thier.trim();
        		
        	if (!my.equals(thier))
        	    return new Outcome(Type.WA, "bad answer");        
        	else
        	    return new Outcome(Type.OK, "OK");                	

        } catch (Exception e) {
            return new Outcome(Type.WA, "bad answer");        
        }        
    }
}
