Aquarium Seller#5209

Aquarium Seller

1 second
64 megabytes
Easy

A seller specializing in cat aquariums plans to visit cities, ensuring each city is visited exactly once. Your task is to help him determine the shortest possible route.

Input

The first line of the input contains a natural number (1 \leq n \leq 13), representing the number of cities. The following lines each contain numbers, which represent the distances between the cities.

In the -th line, the -th number, a_{i,j}, indicates the distance between city and city (0 \leq a_{i,j} \leq 10^6, a_{i,j} = a_{j,i}, a_{i,i} = 0).

Output

On the first line of the output, print the length of the shortest route. On the second line, print numbers indicating the sequence in which the cities should be visited.

Examples

Example 1

Loading
Loading