#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:500000000")
using namespace std;
bool isq[22 * 22 * 22 * 22];
bool isSquare(int n) { return isq[n]; }
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= 22 * 22; i++) isq[i * i] = true;
  for (int columnLine = 0; columnLine <= m; columnLine++) {
    for (int rowLine = 0; rowLine <= n; rowLine++) {
      for (int aValue = 1; aValue <= 22; aValue++)
        for (int bValue = 1; bValue <= 22; bValue++)
          for (int cValue = 1; cValue <= 22; cValue++)
            for (int dValue = 1; dValue <= 22; dValue++) {
              int sqA = aValue * aValue;
              int sqB = bValue * bValue;
              int sqC = cValue * cValue;
              int sqD = dValue * dValue;
              if (isSquare(columnLine * sqA + (m - columnLine) * sqB) &&
                  isSquare(columnLine * sqC + (m - columnLine) * sqD) &&
                  isSquare(rowLine * sqA + (n - rowLine) * sqC) &&
                  isSquare(rowLine * sqB + (n - rowLine) * sqD)) {
                for (int i = 0; i < n; i++) {
                  for (int j = 0; j < m; j++) {
                    if (i < rowLine && j < columnLine)
                      printf("%d ", aValue);
                    else if (i < rowLine && j >= columnLine)
                      printf("%d ", bValue);
                    else if (i >= rowLine && j < columnLine)
                      printf("%d ", cValue);
                    else
                      printf("%d ", dValue);
                  }
                  puts("");
                }
                return 0;
              }
            }
    }
  }
}
