-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorokrett.py
38 lines (37 loc) · 980 Bytes
/
orokrett.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
def main():
roksegd = raw_input().split("EDA")
blocks = list()
blockContents = list()
okStill = False
for r in roksegd:
r = r.strip()
breytur = dict()
for b in r[1:-1].split("OG"):
b = b.strip()
if b[0] == "!":
b = b[1:]
try:
if breytur[b]:
blocks.append(False)
break
except KeyError:
pass
breytur[b] = False
else:
try:
if not breytur[b]:
blocks.append(False)
break
except KeyError:
pass
breytur[b] = True
else:
blocks.append(True)
okStill = True
blockContents.append(breytur)
if not okStill:
print "Neibb"
return
else:
print "Jebb"
main()