#include <bits/stdc++.h>
using namespace std;
const int N = 111;
int n, m;
int a[N], b[N];
void solve(int a[], int n) {
  if (n == 1) {
    a[1] = 1;
  } else if (n == 2) {
    a[1] = 3;
    a[2] = 4;
  } else {
    for (int i = (1); i < (n); i++) a[i] = 2;
    a[n] = n - 2;
  }
}
int main() {
  while (~scanf("%d%d", &n, &m)) {
    solve(a, n);
    solve(b, m);
    for (int i = (1); i < (n + 1); i++)
      for (int j = (1); j < (m + 1); j++)
        printf("%d%c", a[i] * b[j], " \n"[j == m]);
  }
  return 0;
}
