Problem: Isaac is tired of his daily trip to his ofice, using the same shortest route everyday. Although this saves his time, he must see the same scenery again and again. He cannot stand such a boring commutation any more.

One day, he decided to improve the situation. He would change his route everyday at least slightly. His new scheme is as follows. On the first day, he uses the shortest route. On the second day, he uses the second shortest route, namely the shortest except one used on the first day. In general, on the k-th day, the k-th shortest route is chosen. Visiting the same place twice on a route should be avoided, of course.

You are invited to help Isaac, by writing a program which finds his route on the k-th day. The problem is easily modeled using terms in the graph theory. Your program should find the k-th shortest path in the given directed graph.



Input

The input consists of multiple datasets, each in the following format.


n    m    k    a   b
x1   y1   d1
x2   y2   d2
...
xm   ym   dm


Every input item in a dataset is a non-negative integer. Two or more input items in a line are separated by a space.

n is the number of nodes in the graph. You can assume the inequality 2 ≤ n ≤ 50. m is the number of (directed) edges. a is the start node, and b is the goal node. They are between 1 and n, inclusive. You are required to find the k-th shortest path from a to b. You can assume 1 ≤ k ≤ 200 and a ≠ b.

The i-th edge is from the node xi to yi with the length di (1 ≤ i ≤ m). Both xi and yi are between 1 and n, inclusive. di is between 1 and 10000, inclusive. You can directly go from xi to yi, but not from yi to xi unless an edge from yi to xi is explicitly given. The edge connecting the same pair of nodes is unique, if any, that is, if i ≠ j, it is never the case that xi equals xj and yi equals yj. Edges are not connecting a node to itself, that is, xi never equals yi . Thus the inequality 0 ≤ m ≤ n(n - 1) holds.

Note that the given graph may be quite unrealistic as a road network. Both the cases m = 0 and m = n(n - 1) are included in the judges' data.

The last dataset is followed by a line containing five zeros (separated by a space).

Output

For each dataset in the input, one line should be output as specified below. An output line should not contain extra characters such as spaces.

If the number of distinct paths from a to b is less than k, the string None should be printed. Note that the first letter of None is in uppercase, while the other letters are in lowercase.

If the number of distinct paths from a to b is k or more, the node numbers visited in the k-th shortest path should be printed in the visited order, separated by a hyphen (minus sign). Note that a must be the first, and b must be the last in the printed line.

In this problem the term shorter (thus shortest also) has a special meaning. A path P is defined to be shorter than Q, if and only if one of the following conditions holds.

1. The length of P is less than the length of Q. The length of a path is defined to be the sum of lengths of edges on the path.
2. The length of P is equal to the length of Q, and P's sequence of node numbers comes earlier than Q's in the dictionary order. Let's specify the latter condition more precisely. Denote P's sequence of node numbers by p1, p2,..., ps, and Q's by q1, q2,..., qt. p1 = q1 = a and ps = qt = b should be observed. The sequence P comes earlier than Q in the dictionary order, if for some r (1 ≤ r ≤ s and r ≤ t), p1 = q1,..., pr-1 = qr-1, and pr < qr (pr is numerically smaller than qr).


A path visiting the same node twice or more is not allowed.

Example

Input

5 20 10 1 5
1 2 1
1 3 2
1 4 1
1 5 3
2 1 1
2 3 1
2 4 2
2 5 2
3 1 1
3 2 2
3 4 1
3 5 1
4 1 1
4 2 1
4 3 1
4 5 2
5 1 1
5 2 1
5 3 1
5 4 1
4 6 1 1 4
2 4 2
1 3 2
1 2 1
1 4 3
2 3 1
3 4 1
3 3 5 1 3
1 2 1
2 3 1
1 3 1
0 0 0 0 0


Output

1-2-4-3-5
1-2-3-4
None

Solution (in JAVA):

Solution:
import java.util.Arrays;
import java.util.BitSet;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;

public class Main {
	
	Scanner sc;

	Main() {
		
		sc = new Scanner(System.in);
	}

	int n, m, k, a, b,
		c[][] = new int[50][50];

	void run() {

		for (;;) {

			n = sc.nextInt();
			m = sc.nextInt();
			k = sc.nextInt();
			a = sc.nextInt();
			b = sc.nextInt();
			if ((n | m | k | a -- | b --) == 0) break;

			for (int i = 0; i < n; i++) Arrays.fill(c[i], 0, n, INF);
			for (int i = 0; i < m; i++) {

				int x = sc.nextInt() - 1,
					y = sc.nextInt() - 1;
				c[x][y] = sc.nextInt();
			}
			
			kd();
			if (kq.isEmpty()) System.out.println("None");
			else {
				
				P p = kq.remove();
				int i;
				for (i = 0; i < p.p.length - 1; i ++) {
					
					System.out.print(p.p[i] + 1 + "-");
				}
				System.out.println(p.p[i] + 1);
			}
		}
	}

	class P implements Comparable<P> {

		int d;
		int[] p;
		BitSet s;
		int x;
		
		P(int a, int[] b) {

			d = a;
			p = b;
		}

		@Override
		public int compareTo(P t) {

			if (t == null) return - 1;
			if (d != t.d) return d - t.d;
			for (int i = 0; i < p.length; i ++) {
				
				if (i >= t.p.length) break;
				if (p[i] != t.p[i]) return p[i] - t.p[i];
			}
			return p.length - t.p.length;
		}
	}

	P z = new P(0, null);
	
	Queue<P> kq = new PriorityQueue<P>(200 * 50);
	
	void kd() {
		
		kq.clear();
		BitSet s = new BitSet(n);
		Arrays.fill(d, 0, n, null);
		d(a, 0, new int[]{a}, s);
		if (d[b] == null) return;
		d[b].s = s;
		d[b].x = 1;
		kq.add(d[b]);
		
		for (int i = 1; i < k; i ++) {
			
			if (kq.isEmpty()) break;
			
			P p = kq.remove();
			
			s = p.s.get(0, n);
			s.set(p.p[p.x]);
			int op[] = Arrays.copyOf(p.p, p.x);
			int od = 0;
			Arrays.fill(d, 0, n, null);
			for (int j = 2; j <= p.x; j ++) {
				
				od += c[p.p[j - 2]][p.p[j - 1]];
				d[p.p[j - 2]] = z;
			}
			
			d(p.p[p.x - 1], od, op, s);
			if (d[b] != null) {
				d[b].s = s;
				d[b].x = p.x;
				kq.add(d[b]);
			}
			
			for (int j = p.x + 1; j < p.p.length; j ++) {
				
				s = new BitSet(n);
				s.set(p.p[j]);
				op = Arrays.copyOf(p.p, j);
				od += c[p.p[j - 2]][p.p[j - 1]];
				Arrays.fill(d, 0, n, null);
				for (int k = 2; k <= j; k ++) d[p.p[k - 2]] = z;
				
				d(p.p[j - 1], od, op, s);
				if (d[b] != null) {
					d[b].s = s;
					d[b].x = j;
					kq.add(d[b]);
				}
			}
		}
	}
	
	int INF = 10000 * 50;
	P d[] = new P[50];
	Queue<P> q = new PriorityQueue<P>(50 * 49);

	void a(P p, int f, int t) {
		
		if (c[f][t] >= INF) return;
		P np = new P(p.d + c[f][t], Arrays.copyOf(p.p, p.p.length + 1));
		np.p[np.p.length - 1] = t;
		if (np.compareTo(d[t]) >= 0) return;
		d[t] = np;
		q.add(d[t]);
	}
	
	void d(int a, int od, int[] op, BitSet s) {

		q.clear();
		d[a] = new P(od, op);
		for (int i = 0; i < n; i++) {

			if (s.get(i)) continue;
			a(d[a], a, i);
		}

		while (!q.isEmpty()) {

			P p = q.remove();
			int v = p.p[p.p.length - 1];
			
			if (v == b) break;
			if (p.compareTo(d[v]) > 0) continue;

			for (int i = 0; i < n; i++) a(p, v, i);
		}
	}

	public static void main(String args[]) {
		
		Main m = new Main();
		m.run();
	}
}