#include <bits/stdc++.h>
using namespace std;
vector<int> Generate(int leng) {
  vector<int> ans(leng, 1);
  if (leng == 1) return ans;
  if (leng == 2) {
    ans[0] = 3;
    ans[1] = 4;
    return ans;
  }
  if (leng & 1) {
    ans[0] = (leng + 1) / 2;
    ans[1] = 2;
    return ans;
  }
  ans[0] = leng / 2 - 1;
  return ans;
}
int main() {
  int N, M;
  scanf("%d%d", &N, &M);
  vector<int> y = Generate(N);
  vector<int> x = Generate(M);
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < M; ++j) printf("%d ", y[i] * x[j]);
    printf("\n");
  }
  return 0;
}
