#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const double EPS = 1e-6;
bool issquare(int x) {
  return (int)ceil(sqrt(1.0 * x)) == (int)floor(sqrt(1.0 * x));
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  srand(time(NULL));
  while (true) {
    int a = rand() % 100 + 1;
    int b = rand() % 100 + 1;
    int c = rand() % 100 + 1;
    int d = rand() % 100 + 1;
    int row1 = b * b;
    int row2 = d * d;
    for (int j = 0; j < m - 1; j++) {
      row1 += a * a;
      row2 += c * c;
    }
    int col1 = c * c;
    int col2 = d * d;
    for (int i = 0; i < n - 1; i++) {
      col1 += a * a;
      col2 += b * b;
    }
    const int MAT[2][2] = {{a, b}, {c, d}};
    bool found = false;
    if (issquare(row1) && issquare(row2) && issquare(col1) && issquare(col2)) {
      for (int r = 0; r < n; r++) {
        for (int c = 0; c < m; c++)
          printf("%d%c", MAT[(r + 1) / n][(c + 1) / m],
                 c == m - 1 ? '\n' : ' ');
      }
      found = true;
    }
    if (found) break;
  }
  return 0;
}
