Problem: Petya and Vasya arranged a game. The game runs by the following rules. Players have a directed graph consisting of n vertices and m edges. One of the vertices contains a chip. Initially the chip is located at vertex s. Players take turns moving the chip along some edge of the graph. Petya goes first. Player who can't move the chip loses. If the game lasts for 106 turns the draw is announced.

Vasya was performing big laboratory work in "Spelling and parts of speech" at night before the game, so he fell asleep at the very beginning of the game. Petya decided to take the advantage of this situation and make both Petya's and Vasya's moves.

Your task is to help Petya find out if he can win the game or at least draw a tie.

Input

The first line of input contain two integers n and m — the number of vertices and the number of edges in the graph (2 ≤ n ≤ 105, 0 ≤ m ≤ 2·105).

The next n lines contain the information about edges of the graph. i-th line (1 ≤ i ≤ n) contains nonnegative integer ci — number of vertices such that there is an edge from i to these vertices and ci distinct integers ai, j — indices of these vertices (1 ≤ ai, j ≤ n, ai, j ≠ i).

It is guaranteed that the total sum of ci equals to m.

The next line contains index of vertex s — the initial position of the chip (1 ≤ s ≤ n).

Output

If Petya can win print «Win» in the first line. In the next line print numbers v1, v2, ..., vk (1 ≤ k ≤ 106) — the sequence of vertices Petya should visit for the winning. Vertex v1 should coincide with s. For i = 1... k - 1 there should be an edge from vi to vi + 1 in the graph. There must be no possible move from vertex vk. The sequence should be such that Petya wins the game.

If Petya can't win but can draw a tie, print «Draw» in the only line. Otherwise print «Lose».

Examples

Input

5 6
2 2 3
2 4 5
1 4
1 5
0
1


Output

Win
1 2 4 5 


Input

3 2
1 3
1 1
0
2


Output

Lose


Input

2 2
1 2
1 1
1


Output

Draw

Note

In the first example the graph is the following:

<image>

Initially the chip is located at vertex 1. In the first move Petya moves the chip to vertex 2, after that he moves it to vertex 4 for Vasya. After that he moves to vertex 5. Now it is Vasya's turn and there is no possible move, so Petya wins.

In the second example the graph is the following:

<image>

Initially the chip is located at vertex 2. The only possible Petya's move is to go to vertex 1. After that he has to go to 3 for Vasya. Now it's Petya's turn but he has no possible move, so Petya loses.

In the third example the graph is the following:

<image>

Petya can't win, but he can move along the cycle, so the players will draw a tie.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class Codeforces937D {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		
		//directed adjacency list and edges list
		int[] degree = new int[n];
		int[][] adjacency = new int[n][];
		int[][] edges = new int[m][2];
		int edgecounter = 0;
		for (int i = 0; i < n; i++) {
			st = new StringTokenizer(br.readLine());
			degree[i] = Integer.parseInt(st.nextToken());
			adjacency[i] = new int[degree[i]];
			for (int j = 0; j < degree[i]; j++) {
				adjacency[i][j] = Integer.parseInt(st.nextToken())-1;
				edges[edgecounter][0] = i;
				edges[edgecounter][1] = adjacency[i][j];
				edgecounter++;
			}
		}
		
		st = new StringTokenizer(br.readLine());
		int s = Integer.parseInt(st.nextToken())-1;
		
		//DFS tour from s
		boolean[] explored = new boolean[n];
		int[] parent = new int[n];
		for (int i = 0; i < n; i++) {
			parent[i] = i;
		}
		int[] postvisit = new int[n];
		int[] postcounter = new int[1];
		
		//do the DFS
		search(adjacency, n, s, explored, parent, postvisit, postcounter);
		
		//topological order of found things
		int[] toposorted = new int[postcounter[0]];
		for (int i = 0; i < postcounter[0]; i++) {
			toposorted[i] = postvisit[postcounter[0]-1-i];
		}
		
		//DFS from all end vertices
		int[][] reverseAdjacency = toadjacency(edges, n);
		int[] dumbparent = new int[n];
		for (int i = 0; i < n; i++) {
			dumbparent[i] = i;
		}
		boolean[] reverse = new boolean[n];
		for (int i = 0; i < n; i++) {
			if (degree[i] == 0) {
				search2(reverseAdjacency, n, i, reverse, dumbparent);
			}
		}
		
		//reverse topological order
		int[] order = new int[n];
		for (int i = 0; i < postcounter[0]; i++) {
			order[toposorted[i]] = i+1;
		}
		
		//distance via DFS
		int[] distance = new int[n];
		for (int i = 0; i < n; i++) {
			distance[i] = -1;
		}
		distance[s] = 0;
		for (int i = 1; i < postcounter[0]; i++) {
			distance[toposorted[i]] = distance[parent[toposorted[i]]]+1;
		}
		
		//check if you can reach any dead ends.  if not, then instant draw
		//also check if DFS itself gives a win
		boolean deadend = false;
		int win = -1;
		for (int i = 0; i < n; i++) {
			if ((degree[i] == 0) && explored[i]) {
				deadend = true;
				if (distance[i]%2 == 1) {
					win = i;
				}
			}
		}
		
		if (deadend) {
			if (win >= 0) {
				pw.println("Win");
				int[] winarray = new int[distance[win]+1];
				winarray[distance[win]] = win;
				for (int i = distance[win]-1; i >= 0; i--) {
					winarray[i] = parent[winarray[i+1]];
				}
				for (int i = 0; i <= distance[win]; i++) {
					pw.print(winarray[i]+1 + " ");
				}
			}
			else {
				boolean drawpossible = false;
				boolean winpossible = false;
				for (int i = 0; (i < m) && !(winpossible); i++) {
					if (order[edges[i][0]] > order[edges[i][1]]) {
						//reached cycle
						drawpossible = true;
						if ((distance[edges[i][0]]%2 == distance[edges[i][1]]%2) && (reverse[edges[i][1]])) {
							winpossible = true;
							pw.println("Win");
							int[] firstarray = new int[distance[edges[i][0]]+1];
							firstarray[distance[edges[i][0]]] = edges[i][0];
							for (int j = distance[edges[i][0]]-1; j >= 0; j--) {
								firstarray[j] = parent[firstarray[j+1]];
							}
							for (int j = 0; j <= distance[edges[i][0]]; j++) {
								pw.print(firstarray[j]+1 + " ");
							}
							int current = edges[i][1];
							pw.print(current+1 + " ");
							while (degree[current] > 0) {
								current = dumbparent[current];
								pw.print(current+1 + " ");
							}
							
						}
					}
					else if (parent[edges[i][1]] != parent[edges[i][0]]) {
						if ((distance[edges[i][0]]%2 == distance[edges[i][1]]%2) && (reverse[edges[i][1]]) && (distance[edges[i][0]] >= 0)) {
							winpossible = true;
							pw.println("Win");
							int[] firstarray = new int[distance[edges[i][0]]+1];
							firstarray[distance[edges[i][0]]] = edges[i][0];
							for (int j = distance[edges[i][0]]-1; j >= 0; j--) {
								firstarray[j] = parent[firstarray[j+1]];
							}
							for (int j = 0; j <= distance[edges[i][0]]; j++) {
								pw.print(firstarray[j]+1 + " ");
							}
							int current = edges[i][1];
							pw.print(current+1 + " ");
							while (degree[current] > 0) {
								current = dumbparent[current];
								pw.print(current+1 + " ");
							}
						}
					}
				}
				
				if (!(winpossible)) {
					if (drawpossible)
						pw.println("Draw");
					else
						pw.println("Lose");
				}
			}
		}
		
		else {
			pw.println("Draw");
		}
		
		pw.close();
	}
	
	//converts list of edges to adjacency list
		public static int[][] toadjacency(int[][] list, int v) {
			int[] counter = new int[v];
			int n = list.length;
			for (int i = 0; i < n; i++) {
				counter[list[i][1]]++;
			}
			int[][] adjacency = new int[v][];
			for (int i = 0; i < v; i++) {
				adjacency[i] = new int[counter[i]];
			}
			int[] counter2 = new int[v];
			for (int i = 0; i < n; i++) {
				adjacency[list[i][1]][counter2[list[i][1]]] = list[i][0];
				counter2[list[i][1]]++;
			}
			
			return adjacency;
		}
	
	public static void search(int[][] adjacency, int n, int v, boolean[] explored, int[] parent, int[] postvisit, int[] postcounter) {
		explored[v] = true;
		int k = adjacency[v].length;
		for (int i = 0; i < k; i++) {
			int w = adjacency[v][i];
			if (!(explored[w])) {
				parent[w] = v;
				search(adjacency, n, w, explored, parent, postvisit, postcounter);
			}
		}
		postvisit[postcounter[0]] = v;
		postcounter[0]++;
	}
	public static void search2(int[][] adjacency, int n, int v, boolean[] explored, int[] parent) {
		explored[v] = true;
		int k = adjacency[v].length;
		for (int i = 0; i < k; i++) {
			int w = adjacency[v][i];
			if (!(explored[w])) {
				parent[w] = v;
				search2(adjacency, n, w, explored, parent);
			}
		}
	}
}