#include <bits/stdc++.h>
using namespace std;
const int maxN = 100 + 13;
int m[maxN][maxN];
int c[maxN], r[maxN];
int N, M;
void make(int* a, int n) {
  if (n == 2) {
    a[1] = 3;
    a[2] = 4;
    return;
  }
  if (n == 1) {
    a[1] = 1;
    return;
  }
  if (n & 1) {
    a[1] = (n + 1) / 2;
    a[2] = 2;
    for (int i = 3; i <= n; i++) a[i] = 1;
  } else {
    a[1] = (n - 2) / 2;
    for (int i = 2; i <= n; i++) a[i] = 1;
  }
  return;
}
int main() {
  scanf("%d%d", &N, &M);
  make(r, N);
  make(c, M);
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j <= M; j++) {
      cout << r[i] * c[j] << ' ';
    }
    cout << endl;
  }
  return 0;
}
