#include #include #include #include #include using namespace std; struct edge { int f,t; double l; } e[2501]; bool operator<(const edge&lhs,const edge&rhs) { return lhs.l>rhs.l; } int X[53],Y[53]; int f[53]; int fa(int x){return f[x]==x?x:f[x]=fa(f[x]);} int main() { int n,p,q; while(scanf("%d",&n),n) { priority_queue Q; for(int i=0;i<53;i++) f[i]=i; scanf("%d%d",&p,&q),p--,q--; for(int i=0; i