#include <bits/stdc++.h>
const int Len = 100;
int A[Len + 5], B[Len + 5];
int n, m;
void get(int len, int num[]) {
  if (len == 1)
    num[0] = 1;
  else if (len == 2) {
    num[0] = 3;
    num[1] = 4;
  } else {
    if (len & 1) {
      int x = (len + 1) / 2;
      num[0] = x;
      num[1] = 2;
      for (int i = 2; i < len; ++i) num[i] = 1;
    } else {
      int x = (len - 2) / 2;
      num[0] = x;
      for (int i = 1; i < len; ++i) num[i] = 1;
    }
  }
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    get(n, A);
    get(m, B);
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) {
        if (j) printf(" ");
        printf("%d", A[i] * B[j]);
      }
      puts("");
    }
  }
  return 0;
}
