#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n == 1) cout << 1;
    if (n == 2)
      cout << 1 << " " << 5;
    else {
      for (int i = 0; i < n; i++)
        if (i % 2 == 0)
          cout << 1 << " ";
        else
          cout << 5 << " ";
    }
    cout << endl;
  }
}
