#include <iostream>

using namespace std;

int main()
{
    int n, m, a, b, t, u, v;
    cin >> n >> m;
    for(int i = 0;i<m;i++)
    {
        cin >> a >> b >> t;
    }

    cin >> u >> v;
    cout << "-1";
}