#include <bits/stdc++.h>
const int NMAX = 105;
int n, m, A[NMAX], B[NMAX];
void compute(int n, int A[]) {
  if (n == 2) {
    A[1] = 3;
    A[2] = 4;
    return;
  }
  if (n & 1) {
    A[1] = 2;
    for (int i = 2; i <= n - 1; i++) {
      A[i] = 1;
    }
    A[n] = (n + 1) / 2;
  } else {
    for (int i = 1; i < n; i++) {
      A[i] = 1;
    }
    A[n] = n / 2 - 1;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  compute(n, A);
  compute(m, B);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      printf("%d", A[i] * B[j]);
      if (j < m) {
        printf(" ");
      }
    }
    printf("\n");
  }
  return 0;
}
