#include #include #include #include #include #include #define MAX_V 110 #define INF 0x7ffffff using namespace std; map name; int ans[MAX_V][MAX_V],d[MAX_V][MAX_V],dd[MAX_V][MAX_V]; bool ok[MAX_V][MAX_V]; int main() { int n,m,a,b; while(~scanf("%d%d",&n,&m)) { memset(d,0,sizeof(d)); memset(ans,0,sizeof(ans)); memset(ok,0,sizeof(ok)); while(m--) { scanf("%d%d",&a,&b); ans[a][b]=ans[b][a]=d[a][b]=d[b][a]=1; ok[a][b]=ok[b][a]=1; } int times=6; while(times--){ memset(dd,0,sizeof(dd)); for(int i=0;i