#include <bits/stdc++.h>
using namespace std;
void RI() {}
template <typename... T>
void RI(int& head, T&... tail) {
  scanf("%d", &head);
  RI(tail...);
}
void go(int n, int a[]) {
  if (n == 1)
    a[1] = 1;
  else if (n == 2)
    a[1] = 3, a[2] = 4;
  else {
    a[1] = n - 2;
    for (int i = (2); i <= int(n); i++) a[i] = 2;
  }
}
int main() {
  int n, m, a[110], b[110];
  RI(n, m);
  go(n, a);
  go(m, b);
  for (int i = (1); i <= int(n); i++)
    for (int j = (1); j <= int(m); j++)
      printf("%d%c", a[i] * b[j], j == m ? '\n' : ' ');
  return 0;
}
