#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10;
int x[maxn], y[maxn];
void build(int a[], int n) {
  for (int i = 0; i < n; i++) a[i] = 1;
  if (n == 1) a[0] = 1;
  if (n == 2) a[0] = 3, a[1] = 4;
  if (n % 2 == 1 && n > 1) a[0] = (n + 1) / 2, a[1] = 2;
  if (n % 2 == 0 && n > 2) a[0] = (n - 2) / 2;
}
int main() {
  int n, m;
  cin >> n >> m;
  build(x, n);
  build(y, m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << x[i] * y[j] << " ";
    cout << '\n';
  }
  return 0;
}
