#include <bits/stdc++.h>
using namespace std;
long long drcx[] = {0, 0, -1, 1, 1, 1, -1, -1};
long long drcy[] = {1, -1, 0, 0, 1, -1, 1, -1};
long long xx, fr[300009];
struct strk {
  long long id1, id2;
} str[300009];
long long bgmod(long long v1, long long v2, long long md) {
  long long res = 1;
  v1 = v1 % md;
  while (v2 > 0) {
    if (v2 & 1) res = (res * v1) % md;
    v2 = v2 >> 1;
    v1 = (v1 * v1) % md;
  }
  return res;
}
long long check_prime(int n) {
  for (int i = 2; i < min(50000, n); i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  long long t;
  cin >> t;
  while (t--) {
    map<char, long long> mp;
    vector<long long> vec;
    long long n, a, b, c, f = 0, gcd;
    pair<long long, pair<long long, long long> > pp;
    priority_queue<pair<long long, pair<long long, long long> > > qq;
    cin >> n;
    for (long long i = 1; i <= n; i++) {
      cout << 1 << " ";
    }
    cout << endl;
  }
  return 0;
}
