public static void main(String args[]) throws Throwable{
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb=new StringBuilder();
		for(int N=parseInt(in.readLine().trim()),n=0;n++<N;){
			StringTokenizer st=new StringTokenizer(in.readLine());
			int M=parseInt(st.nextToken());K=parseInt(st.nextToken());
			arr=new long[M];
			st=new StringTokenizer(in.readLine());
			long sum=0;
			for(int i=0;i<M;i++)sum+=(arr[i]=parseInt(st.nextToken()));
			long sol=bs(0,sum),s=sol+1;
			LinkedList<LinkedList<Long>> solution=new LinkedList<LinkedList<Long>>();
			for(int i=M-1;i>=0;s+=arr[i],i--) {
				if(s+arr[i]>sol||i+1<=K-solution.size()) {
					solution.addFirst(new LinkedList<Long>());					
					s=0;
				}
				solution.getFirst().addFirst(arr[i]);
			}
			for(LinkedList<Long> a:solution) {
				if(a!=solution.getFirst())sb.append(" / ");
				int c=0;
				for(long b:a){
					if(c++>0)sb.append(" ");
					sb.append(b);
				}
			}
			sb.append("\n");
					
		}
		System.out.print(new String(sb));
	}