#include <bits/stdc++.h>
using namespace std;
int T, n, m, k, a[105], op; //datasets, amount of stacks, amount of cards, variants of cards, cards, oprations
queue<int> Stack[305];  //limited by n
bool stacksEmpty() {
    for(int i=1; i<=n; i++) {
        if(Stack[i].empty() == false) {
            return false;
        }
    }
    return true;
}
void search() { //~~just put the m cards in the stack will cost m operations, no need to check that~~
    if(op >= m && op <= 2*m && stacksEmpty()) { //check to avoid the situation: search hasn't started
        return;
    }
    
}
int main() {
    freopen("meow.in", "r", stdin);
    freopen("meow.out", "w", stdout);
    cin >> T;           //amount of data
    while(T--) {
        op = 0;
        
        cin >> n >> m >> k;  //n<=300
        for(int i=1; i<=m; i++) {
            cin >> a[i];
        }

    }
    return 0;
}