#include using namespace std; const int maxn=3005; const int maxm=100005; int n,m,u[maxm],v[maxm],w[maxm],vis[maxn]; int main() { srand(time(NULL)); while (scanf("%d%d",&n,&m)==2) { for (int i=0;i