#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
int ary[105][105];
int getans(int idx, int n) {
  if (n > 2) {
    if (idx == 0)
      return n - 2;
    else
      return 2;
  } else if (n == 2)
    return idx == 0 ? 3 : 4;
  else
    return 1;
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j) ary[i][j] = getans(i, n) * getans(j, m);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) printf("%d ", ary[i][j]);
    printf("\n");
  }
}
