#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    vector<int> arr;
    arr.insert(arr.end(), n, 1);
    for (int a = 0; a < n; a++) printf("%d ", arr[a]);
    printf("\n");
  }
  return 0;
}
