#include <bits/stdc++.h>
using namespace std;
const long long lINF = 1e18 + 5;
const int INF = 1e9 + 5;
template <class T>
ostream& operator<<(ostream& s, const vector<T>& v) {
  for (size_t i = 0; i < v.size(); i++) {
    s << v[i] << ' ';
  }
  return s;
}
template <class T>
istream& operator>>(istream& s, vector<T>& v) {
  for (size_t i = 0; i < v.size(); i++) {
    s >> v[i];
  }
  return s;
}
void solve() {
  int n;
  cin >> n;
  vector<int> v(n, 1);
  cout << v << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  cin >> q;
  while (q--) solve();
}
