import copy
t = int(input())
for i in range(t):
lst = []
n = int(input())
for j in range(n):
lst.append(list(map(int,input().split())))
ch_lst = copy.deepcopy(lst)
ans = ['']*3
for h in range(3):
for j in range(n):
nh = 0
for k in range(n-1,-1,-1):
ch_lst[j][nh] = lst[k][j]
ans[h] = ans[h] + str(ch_lst[j][nh])
nh = nh + 1
lst =copy.deepcopy(ch_lst[:])
print('#%d' % (i+1))
for j in range(0,n*n,+n):
cut = 0
for k in range(3):
if k == 2: print((ans[k])[j:j+n])
else: print((ans[k])[j:j+n],end = ' ')
cut = cut+3
'problem solving' 카테고리의 다른 글
1959. 두 개의 숫자열 (0) | 2019.09.12 |
---|---|
1966. 숫자를 정렬하자 (0) | 2019.09.12 |
1970. 쉬운 거스름돈 (0) | 2019.09.10 |
1976. 시각 덧셈 (0) | 2019.09.10 |
1974. 스도쿠 검증 (0) | 2019.09.10 |
댓글