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