#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 7;
const double EPS = 1e-9;
const double DB_INF = 1e100;
const double PI = acos(-1.0);
const int INT_INF = 1e9 + 7;
const int MOD = 1e9 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(6);
  cout << fixed;
  int ca;
  for (cin >> ca; ca; ca--) {
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) cout << 1 << ' ';
    cout << endl;
  }
  return 0;
}
