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