import sys H,W=map(int,input().split()) A=[list(map(int,list(input()))) for i in range(H)] for i in range(H): if 0