a=int(input())
b=int(input())
c=int(input())
s=a*b*c
num=str(s)
arr=[0 for _ in range(10)]
for i in num:
if i == '0':
arr[0]=arr[0]+1
if i == '1':
arr[1]=arr[1]+1
if i == '2':
arr[2]=arr[2]+1
if i == '3':
arr[3]=arr[3]+1
if i == '4':
arr[4]+=1
if i == '5':
arr[5]+=1
if i == '6':
arr[6]+=1
if i == '7':
arr[7]+=1
if i == '8':
arr[8]+=1
if i == '9':
arr[9]+=1
for i in arr:
print(i)