5 lines
149 B
Python
5 lines
149 B
Python
n, p, s = map(int, input().split())
|
|
for _ in range(s):
|
|
cards = list(map(int, input().split()))[1:]
|
|
print("KEEP" if p in cards else "REMOVE")
|