#include <bits/stdc++.h>
const int w = 110;
bool ok(int v) {
  int k = sqrt(v);
  return k * k == v;
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int x = 1; x <= w; ++x)
    for (int y = 1; y <= w; ++y)
      if (ok(x * x * (m - 1) + y * y))
        for (int z = 1; z <= w; ++z)
          if (ok(x * x * (n - 1) + z * z))
            for (int t = 1; t <= w; ++t)
              if (ok(y * y * (n - 1) + t * t) && ok(z * z * (m - 1) + t * t)) {
                for (int i = 1; i < n; ++i) {
                  for (int j = 1; j < m; ++j) printf("%d ", x);
                  printf("%d\n", y);
                }
                for (int i = 1; i < m; ++i) printf("%d ", z);
                printf("%d", t);
                return 0;
              }
}
