#include <iostream>

using namespace std;

int t, n, m, v, c[100009], d[100009];

signed main() {
	freopen("assign.in", "rt", stdin);
	freopen("assign.out", "wt", stdout);
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	cin >> t;
	while (t--) {
		cin >> n >> m >> v;
		for (int i = 1; i <= m; i++) {
			cin >> c[i] >> d[i];
		}
		
	}
}
