#include <bits/stdc++.h>
#ifndef Local
#define debug(...) 1337
#define endl '\n'
#endif

using namespace std;

#define int long long

typedef long long ll;
typedef long double ld;

#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()

template <typename T, typename U>
bool smin(T& a, U b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}

template <typename T, typename U>
bool smax(T& a, U b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}

int f(pair<int, int> a) {
	return a.first | (a.second << 30);
}

void solve() {
	int n, m, k;
	cin >> n >> m >> k;
	vector<vector<int> > oldg(n + 1), newg(n + 1);

	map<pair<int, int>, bool> e1, e2;

	for (int i = m; i--; ) {
		int u, v;
		cin >> u >> v;

		oldg[u].push_back(v);
		oldg[v].push_back(u);
		e1[{min(u, v), max(v, u)}] = true;
	}

	for (int i = k; i--; ) {
		int u, v;
		cin >> u >> v;

		newg[u].push_back(v);
		newg[v].push_back(u);
		e2[{u, v}] = true;
		e2[{v, u}] = true;
	}

	set<pair<int, int> > todel, toins;

	for (auto [x, y]: )
}

signed main() {
	ios::sync_with_stdio(false), cin.tie(nullptr);

	int tt = 1;
	// cin >> tt;
	while (tt--)
		solve();

	return 0;
}
