#include<bits/stdc++.h>
using namespace std;
int n,m,a[200100],b[200100],t[200100],u, v;
int main ()
{
	cin >> n >> m;
	for(int i=1; i<=m; i++)
	{
		cin >> a[i] >> b[i] >> t[i];
	}
	cin >> u >> v;
   cout << "-1";
   return 0;
}