#include <cstdio>
#include <cctype>
using namespace std;
void getint(int &x)
{
    int ch = x = 0;
    while (!isdigit(ch = getchar()))
        ;
    for (; isdigit(ch); ch = getchar())
        x = x * 10 + ch - '0';
}
int main()
{
    int T, n;
    getint(T);
    while (T--)
    {
        getint(n);
        for (int i = 1; i < n; i++)
            printf("0 ");
        puts("0");
    }
    return 0;
}