#### 1452945-9@g.puiching.edu.mo (sandy koya)

School : 澳門培正中學
ID : 188268
2023-06-08 20:18:41
k628. Centauri Prime | From: [113.52.79.107] | Post Date : 2023-05-26 13:33

a = int(input())
b = ['A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u']
for i in range(a):
c = str(input())
d = 0
for j in b:
if (c[len(c)-1] == j):
d = 1
if (c[len(c)-1] == 'y'):
d = 2
if (c[len(c)-1] == 'Y'):
d = 2
if d == 1:
print('Case #' + str(i+1) + ': '+c+' is ruled by Alice.')
elif d == 0:
print('Case #' + str(i+1) + ': '+c+' is ruled by Bob.')
else:
print('Case #' + str(i+1) + ': '+c+' is ruled by nobody.')

#### 1450840-0@g.puiching.edu.mo (肥余好朋友)

School : No School
ID : 188719
2023-06-08 08:37:33
k628. Centauri Prime | From: [202.86.172.163] | Post Date : 2023-05-30 16:33

a = int(input())
b = ['A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u']
for i in range(a):
c = str(input())
d = 0
for j in b:
if (c[len(c)-1] == j):
d = 1
if (c[len(c)-1] == 'y'):
d = 2
if (c[len(c)-1] == 'Y'):
d = 2
if d == 1:
print('Case #' + str(i+1) + ': '+c+' is ruled by Alice.')
elif d == 0:
print('Case #' + str(i+1) + ': '+c+' is ruled by Bob.')
else:
print('Case #' + str(i+1) + ': '+c+' is ruled by nobody.')

#### 1452945-9@g.puiching.edu.mo (sandy koya)

School : 澳門培正中學
ID : 188268
2023-06-08 20:18:41
k628. Centauri Prime | From: [60.246.199.127] | Post Date : 2023-05-30 18:41

a = int(input())
b = ['A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u']
for i in range(a):
c = str(input())
d = 0
for j in b:
if (c[len(c)-1] == j):
d = 1
if (c[len(c)-1] == 'y'):
d = 2
if (c[len(c)-1] == 'Y'):
d = 2
if d == 1:
print('Case #' + str(i+1) + ': '+c+' is ruled by Alice.')
elif d == 0:
print('Case #' + str(i+1) + ': '+c+' is ruled by Bob.')
else:
print('Case #' + str(i+1) + ': '+c+' is ruled by nobody.')