#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000500;
int a, b, ANS[105][105];
vector<int> T;
vector<int> solve(int n) {
  if (n < 3) {
    if (n == 1)
      return {1};
    else
      return {3, 4};
  }
  int p = 0, k;
  bool sp = false;
  switch (n % 3) {
    case 0: {
      while (T[p] < n || T[p] % 3) p++;
      k = T[p];
      break;
    }
    case 1: {
      while (T[p] < n || (T[p] % 3 == 0)) p++;
      k = T[p];
      break;
    }
    case 2: {
      n--;
      sp = true;
      while (T[p] < n || (T[p] % 3 == 0)) p++;
      k = T[p];
      break;
    }
  }
  vector<int> Ans(n, 1);
  for (int i = (0); i < (int)((k - n) / 3); i++) Ans[i] = 2;
  if (sp) Ans.push_back(sqrt(k / 16) * 3);
  sort(Ans.begin(), Ans.end());
  return Ans;
}
int main() {
  T = {9, 16, 36, 64, 81, 144, 256};
  while (scanf("%d %d", &a, &b) == 2) {
    vector<int> A = solve(a), B = solve(b);
    for (int i = (0); i < (int)(a); i++)
      for (int j = (0); j < (int)(b); j++) {
        ANS[i][j] = A[i] * B[j];
      }
    for (int i = (0); i < (int)(a); i++) {
      for (int j = (0); j < (int)(b); j++) {
        if (j) printf(" ");
        printf("%d", ANS[i][j]);
      }
      puts("");
    }
  }
  return 0;
}
