a, b, c = map(int,[input(), input(), input()]) res = str(a*b*c) cnt = [res.count(str(i)) for i in range(10)] print('\n'.join(map(str,cnt)))