from collections import Counter S = Counter(input()) for T in map(Counter, ["yukari", "akari", "yuzukizu"]): print(min(S[t] // T[t] for t in T.keys()), end=" ")