#include <bits/stdc++.h>
using namespace std;
int x, y, a[1000], n;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    for (int k = 1; k <= a[i]; k++) cout << 1 << " ";
    cout << endl;
  }
}
