h,w=map(int,input().split()) s=[[1]*w for i in range(h)] def put(s): for l in s:print(*l) if h%2==w%2==0: put(s) elif h%2==0 and w%2==1: for i in range(h):s[i][0]=0 put(s) elif h%2==1 and w%2==0: for j in range(w):s[0][j]=0 put(s) else: if h