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