str = input()

dict = {}

for s in str:
    if s in dict:
        print("NG")
        exit()
    dict[s] = 0

print("OK")
