← Back to List

5698번: Tautogram ↗

Solutions

Python 3
216 B | 216 chars
while True:
    a = input()
    if a == "*":
        break

    L = a.lower().split()
    for i in range(1,len(L)):
        if L[i][0] != L[0][0]:
            print("N")
            break
    else:
        print("Y")