#include <bits/stdc++.h>
using namespace std;
const int X = 11;
int f[101][X * X + 1];
int a[101], b[101];
void generateList(int n, int a[]) {
  f[0][0] = 1;
  for (int i = 1; i <= n; i++)
    for (int j = 0; j <= X * X; j++)
      if (f[i - 1][j] > 0)
        for (int k = 1; j + k * k <= X * X; k++) f[i][j + k * k] = k;
  int s = 0;
  for (s = 1; s <= X; s++)
    if (f[n][s * s] > 0) break;
  s = s * s;
  for (int i = 0; i < n; i++) {
    a[i] = f[n - i][s];
    s -= a[i] * a[i];
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  generateList(n, a);
  generateList(m, b);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << a[i] * b[j] << ' ';
    cout << endl;
  }
}
