#include <bits/stdc++.h>
using namespace std;
int a[110], b[110];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (n == 1)
    a[1] = 1;
  else 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 == 1)
    b[1] = 1;
  else 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]);
    }
    printf("\n");
  }
  return 0;
}
