#include <bits/stdc++.h>
int a[105], b[105];
void generate(int N, int m[]) {
  if (N == 1)
    m[0] = 1;
  else if (N == 2) {
    m[0] = 3;
    m[1] = 4;
  } else {
    m[0] = N - 2;
    for (int i = 1; i < N; i++) m[i] = 2;
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  generate(n, a);
  generate(m, b);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%d ", a[i] * b[j]);
    puts("");
  }
  return 0;
}
