#include <bits/stdc++.h>
using namespace std;
int a[105], b[105];
void fill(int *a, int n) {
  for (int i = 0; i < n; i++) a[i] = 1;
  if (n % 2) {
    a[n - 2] = 2;
    a[n - 1] = (n + 1) / 2;
  } else
    a[n - 1] = n / 2 - 1;
  if (n == 2) {
    a[0] = 3;
    a[1] = 4;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  fill(a, n);
  fill(b, m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%d ", a[i] * b[j]);
    cout << '\n';
  }
  return 0;
}
