
# スペース区切りの整数の入力
h, w = map(int, input().split())


#　2次元行列のリストを作る。
list1 = [[0 for i in range(h)] for j in range(w)]
print(list1)

#list1[1][2] = 1
#list1[0][0] = "#"
#list1[1][1] = "."

#print(list1)
#print(list1[-1][-1])
#print(list1[0][0])

#list1[0:] = [int(input()) for i in range(h)]

#print(list1)

s = [0] * w

i = 0
for i in range(0,w):
	s[i] = input()

print(s)

print(list1)
print(list(s[0]))

list1[:][0] = list(s[0])
list1[:][1] = list(s[1])
list1[:][2] = list(s[2])

print(list1)



#list = [[int(i) for i in input().split()] for i in range(h)]

#print(list)
