#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:128000000")
using namespace std;
void solve();
clock_t start;
int main() {
  int t = 1;
  cout.precision(10);
  cout << fixed;
  start = clock();
  while (t--) {
    solve();
  }
  return 0;
}
bool isSquare(long long cur) {
  double h = sqrt(1.0 * cur);
  for (long long g = (long long)h - 2; g < (long long)h + 3; ++g)
    if (g * g == cur) return true;
  return false;
}
vector<long long> solutions[101];
void solve() {
  vector<long long> vv;
  vv.push_back(3);
  vv.push_back(4);
  solutions[2] = vv;
  for (long long n = 1; n <= 100; ++n) {
    if (n == 2) continue;
    bool flag = false;
    for (long long a = 0; a <= n; ++a) {
      long long now = a + 4 * (n - a);
      if (isSquare(now)) {
        vector<long long> vv;
        for (long long i = 0; i < a; ++i) vv.push_back(1);
        for (long long i = a; i < n; ++i) vv.push_back(2);
        solutions[n] = vv;
        flag = true;
        break;
      }
    }
    if (flag) continue;
    for (long long a = 0; a <= n; ++a)
      for (long long b = 0; b + a <= n; ++b) {
        long long now = a + b * 4 + (n - b - a) * 9;
        if (isSquare(now)) {
          vector<long long> vv;
          for (long long i = 0; i < a; ++i) vv.push_back(1);
          for (long long i = a; i < a + b; ++i) vv.push_back(2);
          for (long long i = a + b; i < n; ++i) vv.push_back(3);
          solutions[n] = vv;
          flag = true;
          break;
        }
      }
  }
  long long n, m;
  cin >> n >> m;
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < m; ++j)
      cout << solutions[n][i] * solutions[m][j] << ' ';
    cout << "\n";
  }
}
