#include <bits/stdc++.h>
using namespace std;
int a, b, c, d;
int n, m;
bool _judge(int x) {
  int dtj = (int)sqrt(x);
  return dtj * dtj == x;
}
int main() {
  scanf("%d %d", &n, &m);
  while (true) {
    a = rand() % 50 + 1;
    b = rand() % 50 + 1;
    c = rand() % 50 + 1;
    d = rand() % 50 + 1;
    int mat[4];
    mat[0] = (m - 1) * a * a + b * b;
    mat[1] = (n - 1) * a * a + c * c;
    mat[2] = (m - 1) * c * c + d * d;
    mat[3] = (n - 1) * b * b + d * d;
    if (_judge(mat[0]) && _judge(mat[1]) && _judge(mat[2]) && _judge(mat[3]))
      break;
  }
  for (int i = 1; i < n; i++) {
    for (int j = 1; j < m; j++) printf("%d ", a);
    printf("%d\n", b);
  }
  for (int i = 1; i < m; i++) printf("%d ", c);
  printf("%d\n", d);
  return 0;
}
