#include <stdio.h>
#define MAXN 101
int main() {
int musicos[MAXN][MAXN], n, m, x, y, z;
int aux = -1, sol[3];
int i, j, k;
for (i = 0; i < m; i++) {
scanf("%d %d %d", &x
, &y
, &z
); x--;
y--;
musicos[x][y] = z;
musicos[y][x] = z;
}
for (i = 0; i < n; i++) {
for (j = i+1; j < n; j++) {
for (k = j+1; k < n; k++) {
if (musicos[i][j] + musicos[i][k] + musicos[j][k] > aux) {
aux = musicos[i][j] + musicos[i][k] + musicos[j][k];
sol[0] = i;
sol[1] = j;
sol[2] = k;
}
}
}
}
printf("%d %d %d\n", sol
[0]+1, sol
[1]+1, sol
[2]+1);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgojZGVmaW5lIE1BWE4gMTAxCgppbnQgbWFpbigpIHsKICBpbnQgbXVzaWNvc1tNQVhOXVtNQVhOXSwgbiwgbSwgeCwgeSwgejsKICBpbnQgYXV4ID0gLTEsIHNvbFszXTsKICBpbnQgaSwgaiwgazsKICAKICBzY2FuZigiJWQgJWQiLCAmbiwgJm0pOwoKICBmb3IgKGkgPSAwOyBpIDwgbTsgaSsrKSB7CiAgCXNjYW5mKCIlZCAlZCAlZCIsICZ4LCAmeSwgJnopOyAKICAgIHgtLTsgCiAgICB5LS07CiAgICBtdXNpY29zW3hdW3ldID0gejsKICAgIG11c2ljb3NbeV1beF0gPSB6OwogIH0KCiAgZm9yIChpID0gMDsgaSA8IG47IGkrKykgewogICAgZm9yIChqID0gaSsxOyBqIDwgbjsgaisrKSB7CiAgICAgIGZvciAoayA9IGorMTsgayA8IG47IGsrKykgewoJCWlmIChtdXNpY29zW2ldW2pdICsgbXVzaWNvc1tpXVtrXSArIG11c2ljb3Nbal1ba10gPiBhdXgpIHsKCSAgCQlhdXggPSBtdXNpY29zW2ldW2pdICsgbXVzaWNvc1tpXVtrXSArIG11c2ljb3Nbal1ba107CgkgIAkJc29sWzBdID0gaTsgCgkgIAkJc29sWzFdID0gajsgCgkgIAkJc29sWzJdID0gazsKCQl9CiAgICAgIH0KICAgIH0KICB9CgogIHByaW50ZigiJWQgJWQgJWRcbiIsIHNvbFswXSsxLCBzb2xbMV0rMSwgc29sWzJdKzEpOwoKICByZXR1cm4gMDsKfQ==