#include <bits/stdc++.h>
using namespace std;
int main() {
  int T, n;
  cin >> T;
  while (T--) {
    cin >> n;
    if (n - 1 > 0) {
      for (int i = 0; i < n; i++) {
        cout << n - 1 << " ";
      }
    } else {
      cout << 1;
    }
    cout << endl;
  }
  return 0;
}
