#include <bits/stdc++.h>
using namespace std;
int n, m, N = 1, M = 1;
int a[111];
int b[111][111];
int pcount(int x, int p) {
  int res = 0;
  while (x % p == 0) res++, x /= p;
  return res;
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  a[0] = 10000 << 8;
  while (M < m) {
    if (m - M >= 3) {
      int ind, best = -1;
      for (int i = 0; i < (M); i++) {
        int p = pcount(a[i], 2);
        if (p > best) {
          best = p;
          ind = i;
        }
      }
      a[ind] /= 2;
      a[M] = a[M + 1] = a[M + 2] = a[ind];
      M += 3;
    } else {
      int ind, best = -1;
      for (int i = 0; i < (M); i++) {
        int p = pcount(a[i], 5);
        if (p > best) {
          best = p;
          ind = i;
        }
      }
      int d5 = a[ind] / 5;
      a[ind] = d5 * 3;
      a[M] = d5 * 4;
      M += 1;
    }
  }
  for (int i = 0; i < (M); i++) b[0][i] = a[i];
  while (N < n) {
    if (n - N >= 3) {
      int row, best = -1;
      for (int i = 0; i < (N); i++) {
        int p = 1070000000LL;
        for (int j = 0; j < (M); j++) p = min(p, pcount(b[i][j], 2));
        if (p > best) {
          best = p;
          row = i;
        }
      }
      for (int j = 0; j < (M); j++) {
        b[row][j] /= 2;
        b[N][j] = b[N + 1][j] = b[N + 2][j] = b[row][j];
      }
      N += 3;
    } else {
      int row, best = -1;
      for (int i = 0; i < (N); i++) {
        int p = 1070000000LL;
        for (int j = 0; j < (M); j++) p = min(p, pcount(b[i][j], 5));
        if (p > best) {
          best = p;
          row = i;
        }
      }
      for (int j = 0; j < (M); j++) {
        int d5 = b[row][j] / 5;
        b[row][j] = d5 * 3;
        b[N][j] = d5 * 4;
      }
      N += 1;
    }
  }
  for (int i = 0; i < (N); i++)
    for (int j = 0; j < (M); j++) {
      cout << b[i][j] << " ";
      if (j == M - 1) cout << endl;
    }
}
