s=input() for t in["yukari","akari","yuzukizu"]:print(min(s.count(u)//t.count(u)for u in t))