x = int(input()) y = int(input()) z = int(input()) a = str(x*y*z) for i in range(10): print(a.count(str(i)))