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