#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[110], b[110];
void getans(int s, int p[]) {
  if (s == 1) {
    p[0] = 1;
  } else if (s == 2) {
    p[0] = 3, p[1] = 4;
  } else if (s & 1) {
    p[0] = 2;
    p[1] = s / 2 + 1;
    for (int i = 2; i < s; ++i) p[i] = 1;
  } else {
    p[0] = s / 2 - 1;
    for (int i = 1; i < s; ++i) p[i] = 1;
  }
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    getans(n, a);
    getans(m, b);
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) {
        printf("%d ", a[i] * b[j]);
      }
      printf("\n");
    }
  }
}
