import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### from collections import Counter def f(s, t): c = Counter(t) res = 10 ** 18 for i in c: res = min(res, s.count(i) // c[i]) return res s = input() print(f(s, "yukari"), f(s, "akari"), f(s, "yuzukizu"))