#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N=1000100;
const int Mod=1e9+7;
int c[N],d[N],ans,a[N],b[N],lis[N];int T,n,q,m,v;
signed main(){
	freopen("query.in","r",stdin);
	freopen("query.out","w",stdout);
	cin>>T;
	while(T--) {
		cin>>n>>q;
		for(int i=1;i<=q;i++) cout<<"1\n"; 
	}
	return 0;
}
