#include<stdio.h>
#include<stdlib.h>
#define MIN(a,b) (a<b)?(a):(b)
#define MAX(a,b) (a>b)?(a):(b)
typedef struct
{
int b;
int e;
double p;
}ot;
ot a[1000]={0};
int b[100][100]={0};
double c[100]={0};
int qsort_helper_by_size(const void *e1, const void *e2)
     {
       if(((const ot *)e2)->b != ((const ot *)e1)->e)return ((const ot *)e2)->b - ((const ot *)e1)->b;
       else
	 return (((const ot *)e2)->e - ((const ot *)e1)->e);
     }

void solve()
{


}
int main()
{
int i, j, p, t, n, min, max, it=0;
double u;
freopen("dist.in","r",stdin);
scanf("%d %d %d",&n,&p,&t);
while(!feof(stdin))
{
scanf("%d %d %lf",&i,&j,&u);
min=MIN(i,j);
max=MAX(i,j);
a[it].b=min;
a[it].e=max;
a[it].p=u;
b[min][++b[min][0]]=max;
b[max][++b[max][0]]=min;
it++;
}

qsort(a, it, sizeof(a), qsort_helper_by_size);
solve();
fclose(stdin);

return 0;
}
