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

return 0;
}