#include <bits/stdc++.h>
using namespace std;
void OUT_TST(string s, istream_iterator<string> it) { cerr << s; }
template <typename T, typename... Args>
void OUT_TST(string s, istream_iterator<string> it, T a, Args... args) {
  cerr << *it << "=" << a << " ";
  OUT_TST(s, ++it, args...);
}
template <class T>
void rd(T& ret) {
  ret = 0;
  bool ok = 0, u = 0;
  for (;;) {
    int c = getchar();
    if (c >= '0' && c <= '9')
      ret = (ret << 3) + (ret << 1) + c - '0', ok = 1;
    else if (c == '-')
      u = 1;
    else if (ok) {
      if (u) ret *= -1;
      return;
    }
  }
}
long long powmod(long long p, long long n, long long mod) {
  long long ret = 1;
  for (; n; n >>= 1) {
    if (n & 1) ret = ret * p % mod;
    p = p * p % mod;
  }
  return ret;
}
template <class T>
bool chmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool chmax(T& a, const T& b) {
  return b > a ? a = b, 1 : 0;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
const int N = (int)1e3 + 9;
const int M = 109;
const int T = 21;
bool dp[M][N];
void generate(vector<vector<int>>& combine) {
  combine.resize(M);
  dp[0][0] = true;
  for (int i = 0; i < M - 1; ++i) {
    for (int j = 0; j < N; ++j)
      if (dp[i][j]) {
        for (int k = 1; k < T && j + k * k < N; ++k) {
          dp[i + 1][j + k * k] = 1;
        }
      }
  }
  for (int i = 1; i < M; ++i) {
    bool ok = false;
    for (int k = 1; k < T && k * k < N; ++k) {
      if (dp[i][k * k]) {
        pair<int, int> state = {i, k * k};
        combine[i].clear();
        while (state.first > 0) {
          for (int t = 1; t < T; ++t) {
            int first = state.first - 1, second = state.second - t * t;
            if (second >= 0 && dp[first][second]) {
              combine[i].push_back(t);
              state = {first, second};
              break;
            }
          }
        }
        ok = true;
        break;
      }
    }
    assert(ok);
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  vector<vector<int>> combine;
  generate(combine);
  int n, m;
  cin >> n >> m;
  vector<vector<int>> ans(n, vector<int>(m, 0));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (j) cout << " ";
      cout << combine[n][i] * combine[m][j];
    }
    cout << "\n";
  }
  return 0;
}
