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