#include <bits/stdc++.h>
using namespace std;
int a[101], b[101];
void fill(int *a, int N) {
  if (N == 1) {
    a[0] = 1;
    return;
  }
  if (N == 2) {
    a[0] = 3;
    a[1] = 4;
    return;
  }
  for (int i = 0; i < (int)(N - 1); ++i) {
    a[i] = 1;
  }
  if (N % 2 == 0) {
    a[N - 1] = (N - 1) / 2;
    return;
  }
  a[N - 2] = 2;
  a[N - 1] = (N + 2) / 2;
}
int main() {
  int N, M;
  cin >> N >> M;
  fill(a, N);
  fill(b, M);
  for (int i = 0; i < (int)(N); ++i) {
    for (int j = 0; j < (int)(M); ++j) {
      cout << a[i] * b[j] << ' ';
    }
    cout << '\n';
  }
  return 0;
}
