#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int n, m;
int matrix[N][N];
int r[N], c[N];
bool judge(int *a, int size) {
  int sum = 0;
  for (int i = 0; i < size; ++i) {
    sum += a[i] * a[i];
  }
  int sq = sqrt(sum);
  return sq * sq == sum;
}
bool f;
int tar;
int temp[N];
void dfs(int d, int *t) {
  if (f) {
    return;
  }
  if (d == tar) {
    if (judge(temp, tar)) {
      for (int i = 0; i < tar; ++i) {
        t[i] = temp[i];
      }
      f = 1;
    }
    return;
  }
  for (int v = 1; v <= 10; ++v) {
    temp[d] = v;
    dfs(d + 1, t);
  }
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    f = 0;
    tar = n;
    dfs(0, r);
    tar = m;
    f = 0;
    dfs(0, c);
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) {
        matrix[i][j] = r[i] * c[j];
        printf("%d ", matrix[i][j]);
      }
      puts("");
    }
  }
}
