using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var s = ReadLine(); foreach (var c in s) ++count[c - 'a']; var yukari = s.Length; yukari = Math.Min(yukari, GetCount('y')); yukari = Math.Min(yukari, GetCount('u')); yukari = Math.Min(yukari, GetCount('k')); yukari = Math.Min(yukari, GetCount('a')); yukari = Math.Min(yukari, GetCount('r')); yukari = Math.Min(yukari, GetCount('i')); var akari = s.Length; akari = Math.Min(akari, GetCount('a') / 2); akari = Math.Min(akari, GetCount('k')); akari = Math.Min(akari, GetCount('r')); akari = Math.Min(akari, GetCount('i')); var yuzukizu = s.Length; yuzukizu = Math.Min(yuzukizu, GetCount('y')); yuzukizu = Math.Min(yuzukizu, GetCount('u') / 3); yuzukizu = Math.Min(yuzukizu, GetCount('z') / 2); yuzukizu = Math.Min(yuzukizu, GetCount('k')); yuzukizu = Math.Min(yuzukizu, GetCount('i')); WriteLine($"{yukari} {akari} {yuzukizu}"); } static int[] count = new int[26]; static int GetCount(char c) => count[c - 'a']; }