map int input split list input for in range print -1 -1 -1 -1 -1 -1 -1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
x,y = map(int,input().split())
a = [list(input()) for i in range(x)]
print(a)
b =[];c =[];h = -1
p = [(1,1),(1,-1),(-1,1),(-1,-1),(1,0),(0,1),(-1,0),(0,-1)]
for i in range(x):
for j in range(y):
if a[i][j] == '0':
b.append((i,j))
h +=1
c.append([])
for g in range(1,max(x,y)):
for g2 in range(8):
if 0 <= i+g*(p[g2][0]) < x and 0<= j+g*(p[g2][1]) < y:
c[h].append((i+g*(p[g2][0]),j+g*(p[g2][1])))
print(c)