#include <bits/stdc++.h>
using namespace std;
int dp[101][10001], a[101], b[101];
void go(int d[], int n) {
  int last;
  for (int i = (1); i < (101); ++i) {
    if (dp[n][i * i]) {
      last = i * i;
      break;
    }
  }
  int it = 0;
  while (n) {
    d[it++] = dp[n][last];
    last -= d[it - 1] * d[it - 1];
    n--;
  }
}
int main() {
  dp[0][0] = -1;
  for (int i = (1); i < (101); ++i) {
    for (int j = 0; j < (100); ++j) {
      for (int k = i * i; k <= 10000; k++) {
        if (dp[j][k - i * i]) {
          dp[j + 1][k] = i;
        }
      }
    }
  }
  for (int i = (1); i < (101); ++i) {
    bool ff = false;
    for (int j = 0; j < (101); ++j) {
      if (dp[i][j * j]) ff = true;
    }
    if (!ff) printf("WA %d\n", i);
  }
  int n, m;
  scanf("%d%d", &n, &m);
  go(a, n);
  go(b, m);
  for (int i = 0; i < (n); ++i) {
    for (int j = 0; j < (m); ++j) {
      if (j) putchar(' ');
      printf("%d", a[i] * b[j]);
    }
    puts("");
  }
  return 0;
}
