Triangular Route#995

Triangular Route

1 second
64 megabytes
Very easy

A taxi driver was cruising through the city, saw a passenger trying to hail a ride, and drove past. Some time later, at a different square, the driver saw the same passenger again, and again drove past. Soon, at yet another square, the driver saw that passenger once more.

"They're avoiding me!" thought the passenger.

"It's a triangle!" realized the driver.

The city has squares. Any two squares are connected by exactly one two-way road. A taxi driver works in this city and has an interesting habit - on Sunday mornings, they like to leave the garage, get in the taxi, and drive a triangular route that passes through exactly three squares (that is, first they drive from one square to another, then to a third square, then return to the starting square, and repeat this route). The driver imagines that somewhere along this route there's a potential passenger waiting.

Naturally, the driver wants to pass by the imaginary passenger's location as often as possible. To do this, the chosen route should be as short as possible. Write a program that finds the optimal route for the taxi driver.

Input

The first line contains the number (3 \leq N \leq 100), followed by an N \times N matrix of distances between squares (the number at position denotes the length of the road connecting the -th and -th squares). All numbers in the matrix (except those on the main diagonal) are natural numbers not exceeding . The matrix is symmetric about the main diagonal, and the main diagonal contains .

Output

Output the numbers of the squares in the optimal route. If there are multiple routes, output any of them.

Examples

Example 1

Loading
Loading