#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  int a1 = n * n - (n - 1);
  int a2 = n * 2;
  int b1 = m * m - (m - 1);
  int b2 = m * 2;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      int res = 0;
      if (i == 0)
        res = a1;
      else
        res = a2;
      if (j == 0)
        res *= b1;
      else
        res *= b2;
      if (j == 0)
        printf("%d", res);
      else
        printf(" %d", res);
    }
    printf("\n");
  }
}
