n = int(input())
array = list(map(int,input().split()))
all = [0]*23
for i in array :
all[i-1] += 1
for j in all :
print(j,end=" ")
*1094๋ฒ
n = int(input())
array = list(map(int,input().split()))
result = reversed(array)
for i in result :
print(i,end=' ')
*1095๋ฒ
n = int(input())
array = list(map(int,input().split()))
n = sorted(array)[0]
print(n)
*1096๋ฒ
n = int(input())
array = [[0 for col in range(19)] for row in range(19)]
for i in range(n):
x , y = map(int,input().split())
array[x-1][y-1] = 1
for j in array :
for k in j :
print(k, end=" ")
print()
*1097๋ฒ
array = [[0 for col in range(19)] for row in range(19)]
for i in range(19):
a = list(map(int,input().split()))
array[i] = a
n = int(input()) #๋ค์ง์ ์
for w in range(n) :
x , y = map(int,input().split())
for z in range(19) :
if array[x-1][z] == 1 :array[x-1][z]=0
else :array[x-1][z]=1
if array[z][y-1] == 1 :array[z][y-1]=0
else :array[z][y-1]=1
for z in array :
for o in z :
print(o,end=" ")
print()
*1098๋ฒ
h,w = map(int,input().split())
n = int(input())
# d = 0 ๊ฐ๋ก d=1 ์ธ๋ก
array = [[0 for col in range(w)] for row in range(h)]
for i in range(n):
l,d,x,y = map(int,input().split())
if d == 1 : #๋ง๋๊ฐ ์ธ๋ก๋ผ๋ฉด
for q in range(l) :
array[x-1+q][y-1] = 1
if d == 0 : #๋ง๋๊ฐ ๊ฐ๋ก๋ผ๋ฉด
for w in range(l) :
array[x-1][y+w-1] = 1
for z in array :
for k in z :
print(k, end=" ")
print()
*1099๋ฒ
all = [] ; x=1;y=1
for i in range(10):
a = list(map(int,input().split()))
all.append(a)
while(True) :
if all[x][y] == 2 : #๋จน์ด ๋ฐ๊ฒฌํ์๋ break
all[x][y] = 9
break
elif all[x+1][y] ==1 and all[x][y+1] ==1 : #๋ฒฝ์ผ๋ก ๊ฐ๋ก ๋งํ์๋ break
all[x][y] = 9
break
all[x][y] = 9
if all[x][y+1] == 1 : #์ค๋ฅธ์ชฝ์ด ๋ฒฝ์ด๋ฉด ์๋๋ก 1์นธ
x +=1
elif all[x+1][y] == 1 : # ์๋์ชฝ์ด ๋ฒฝ์ด๋ฉด ์ค๋ฅธ์ชฝ์ผ๋ก 1์นธ
y += 1
else : y+=1 # ์ฃผ๋ณ์ ๋ฒฝ์ด ์์ผ๋ฉด ์ค๋ฅธ์ชฝ์ผ๋ก 1์นธ
for p in all :
for o in p:
print(o,end=" ")
print()