#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const double EPS = 1e-6;
int a[105], b[105];
void setup(int n, int *arr) {
  if (n == 1)
    arr[0] = 1;
  else if (n == 2)
    arr[0] = 3, arr[1] = 4;
  else if (n & 1) {
    arr[0] = 2;
    for (int i = 1; i < n - 1; i++) arr[i] = 1;
    arr[n - 1] = (n + 1) >> 1;
  } else {
    for (int i = 0; i < n - 1; i++) arr[i] = 1;
    arr[n - 1] = (n - 2) >> 1;
  }
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  setup(n, a);
  setup(m, b);
  for (int r = 0; r < n; r++)
    for (int c = 0; c < m; c++)
      printf("%d%c", a[r] * b[c], c == m - 1 ? '\n' : ' ');
  return 0;
}
