#include <bits/stdc++.h>
using namespace std;
const int mx = 1e7 + 5;
char sieve[mx + 5];
void primeSieve(int n) {
  sieve[0] = sieve[1] = 1;
  for (int i = 4; i <= n; i += 2) sieve[i] = 1;
  int sqrtn = sqrt(n);
  for (int i = 3; i <= sqrtn; i += 2) {
    if (sieve[i] == 0) {
      for (int j = i * i; j <= n; j += 2 * i) sieve[j] = 1;
    }
  }
}
bool prime(long long n) {
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cout << 1;
      if (i + 1 < n) cout << " ";
    }
    cout << "\n";
  }
  return 0;
}
