A - Chord Editorial by cirno3153

別解

以下のような実装でもACすることができます。

S = input()
cond = S in "が ACE、BDF、CEG、DFA、EGB、FAC、GBD のいずれかと等しいとき"
print("Yes" if cond else "No")

posted:
last update: