n = int(input()) for i in range(999): if int(input()) == n: print("unlocked") break else: print('locked')