-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathccc06s1.py
More file actions
34 lines (26 loc) · 716 Bytes
/
ccc06s1.py
File metadata and controls
34 lines (26 loc) · 716 Bytes
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
mom = input()
dad = input()
n = int(input())
for c in range(n):
child = input()
good = True
for i in range(len(child)):
momPair = mom[(i*2):(i*2)+2]
dadPair = dad[(i*2):(i*2)+2]
childA = child[i]
if childA == childA.upper():
if childA in momPair or childA in dadPair:
pass
else:
good = False
print("Not their baby!")
break
else:
if childA in momPair and childA in dadPair:
pass
else:
good = False
print("Not their baby!")
break
if good:
print("Possible baby.")