Yen algorithm#4394

Yen algorithm

1 second
128 megabytes
Easy

Find the -th shortest path between two fixed vertices in an undirected graph.

Input

The first line contains the number of vertices (1 \leq n \leq 100) and edges (1 \leq m \leq 4000) in the graph, and the number of the path (1 \leq k \leq 500).

The next lines describe the graph edges. Each line contains a triple (u, v, w), describing an edge connecting the vertices and of weight .

The last line contains the numbers of two vertices and , between which the path must be found.

There can be no multiple edges in a graph; there can be no loops. All weights are positive and do not exceed . It is guaranteed that the -th path exists.

Output

In the first line print two numbers: the desired weight of the path and the number of vertices in it.

In the next line print the path itself — a sequence of vertex numbers.

Examples

Example 1

Loading
Loading