#include <bits/stdc++.h>
using namespace std;
const int modulo = int(1e9 + 7);
const int N = int(2e6 + 7);
bool sec(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.first == b.first)
    return (a.second < b.second);
  else {
    return (a.first < b.first);
  }
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
bool sortbysecdesc(const pair<int, int> &a, const pair<int, int> &b) {
  return a.second > b.second;
}
long long calc(long long a, long long b, long long c, long long d) {
  return (abs(b - a) + abs(c - a) + abs(d - a));
}
void solve() {
  long long n;
  cin >> n;
  for (long long i = 0; i < (n); ++i) cout << "1 ";
  cout << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
