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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;


import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.TreeSet;


public final class CF_467_D1_B {

	static boolean verb=true;
	static void log(Object X){if (verb) System.err.println(X);}
	static void log(Object[] X){if (verb) {for (Object U:X) System.err.print(U+" ");System.err.println("");}}
	static void log(int[] X){if (verb) {for (int U:X) System.err.print(U+" ");System.err.println("");}}
	static void log(int[] X,int L){if (verb) {for (int i=0;i<L;i++) System.err.print(X[i]+" ");System.err.println("");}}
	static void log(long[] X){if (verb) {for (long U:X) System.err.print(U+" ");System.err.println("");}}

	static void logWln(Object X){if (verb) System.err.print(X);}
	static void info(Object o){	System.out.println(o);}
	static void output(Object o){outputWln(""+o+"\n");	}
	static void outputWln(Object o){try {out.write(""+ o);} catch (Exception e) {}}


	static long mod=1000000007;
	static long MX=1000000000000000001L;

	// Global vars
	static BufferedWriter out;
	static InputReader reader;

	static long powerMod(long b,long e,long m){
		long x=1;
		while (e>0) {
			if (e%2==1)
				x=(b*x)%m;
			b=(b*b)%m;
			e=e/2;
		}
		return x; 
	}

	static int sign(long x){
		if (x==0)
			return 0;
		if (x>0)
			return 1;
		return -1;
	}



	static void process() throws Exception {


		out = new BufferedWriter(new OutputStreamWriter(System.out));
		reader=new InputReader(System.in);

		int n=reader.readInt();
		int m=reader.readInt();
		int[][] friends=new int[n][];
		ArrayList<Integer>[] anc=new ArrayList[n];

		for (int i=0;i<n;i++)
			anc[i]=new ArrayList<Integer>();

		ArrayList<Integer> proc=new ArrayList<Integer>();
		int[] win=new int[n];
		int[] stack=new int[2*n];
		int r=0;
		int w=0;
		int[] prev=new int[n];
		Arrays.fill(prev,-1);

		boolean[][] ok=new boolean[n][2];
		int[][] dist=new int[n][2];
		for (int i=0;i<n;i++)
			Arrays.fill(dist[i],Integer.MAX_VALUE);
		
		for (int i=0;i<n;i++){
			int c=reader.readInt();
			friends[i]=new int[c];

			for (int e=0;e<c;e++){
				int j=reader.readInt()-1;
				friends[i][e]=j;
				anc[j].add(i);
			}
			if (c==0){
				stack[w++]=i;
				ok[i][0]=true;
				dist[i][0]=0;
				//proc.add(i);
				//win[i]=-1;
			}

		}
		
		int s=reader.readInt()-1;
		
		
		
		while (r<w){
			int u=stack[r++];
			for (int v:anc[u]){
				boolean add=false;
				for (int e=0;e<2;e++){
					if (ok[u][e]) {
						if (!ok[v][1-e]){
							dist[v][1-e]=dist[u][e]+1;
							ok[v][1-e]=true;
							add=true;
						}
					}
				}
				if (add){
					stack[w++]=v;
					
					prev[v]=u;
				}
			}
		}

		
	
		if (ok[s][1]){
			output("Win");
			int u=s;
			int e=1;
			while (u>=0){
				outputWln((u+1)+" ");
				int tgt=-1;
				loop:for (int v:friends[u]){
					if (dist[v][1-e]==dist[u][e]-1){
						tgt=v;
						e=1-e;
						break loop;
					}
				}
				u=tgt;
			}
			
		} else {
			// try to find loop
			int st=0;
		
			boolean[] visited=new boolean[n];
			boolean[] onstack=new boolean[n];
			int[] cur=new int[n];
			boolean loop=false;
			stack[st++]=s;
			onstack[s]=true;
			lp:while (st>0){
				int u=stack[st-1];
				if (cur[u]<friends[u].length){
					int v=friends[u][cur[u]++];
					if (onstack[v]){
						loop=true;
						break lp;
					} else {
						stack[st++]=v;
						onstack[v]=true;
					}
					
				} else {
					onstack[u]=false;
					st--;
				}
				
			}
			if (loop){
				output("Draw");
			} else 
				output("Lose");
			
		}

		try {
			out.close();
		}
		catch (Exception EX){}


	}


	public static void main(String[] args) throws Exception {
		process();

	}

	static final class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		private int read() throws IOException {
			if (curChar >= numChars) {
				curChar = 0;
				numChars = stream.read(buf);
				if (numChars <= 0) {
					return -1;
				}
			}
			return buf[curChar++];
		}


		public final String readString() throws IOException {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res=new StringBuilder();
			do {
				res.append((char)c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public final int readInt() throws IOException {
			int c = read();
			boolean neg=false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d=(char)c;
			//log("d:"+d);
			if (d=='-') {
				neg=true;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			//log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		public final long readLong() throws IOException {
			int c = read();
			boolean neg=false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d=(char)c;
			//log("d:"+d);
			if (d=='-') {
				neg=true;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			//log("res:"+res);
			if (neg)
				return -res;
			return res;

		}




		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
	}


}