#include <bits/stdc++.h>
using namespace std;
const int nm = 105;
int n, k, m, t;
int a[nm], b[nm];
bool check[nm];
int main() {
  int i, j, x, y, z, w;
  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 (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 (i = 2; i <= m; i++) b[i] = 2;
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) printf("%d ", a[i] * b[j]);
    cout << endl;
  }
}
