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