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