
#include <iostream>
#include <deque>
#include <algorithm>
using namespace std;
#define int long long
int const N=5e5+10;
int n,m,q;
// int a[N],b[N],c[N];
inline void solve()
{
	cin>>n>>m>>q;
	for (int i=0;i<m;i++)
	{
		int u,v;
		cin>>u>>v;
	}
	cout<<m<<endl;
	cout<<-1<<endl;
}
signed main()
{
	ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
	int t=1;
	// cin>>t;
	while (t--)
		solve();
}