//
//  main.cpp
//  Codeforces Round #467 (Div. 2) D
//
//  Created by Songjy on 18/6/6.
//  Copyright © 2018年 Songyj. All rights reserved.
//

#include <bits/stdc++.h>

using namespace std;

const int maxn=1e5+100;

vector<int> g[maxn];
int st[maxn];
bool vis[maxn];

int main(int argc, const char * argv[]) {

    int n,m,s;
    cin>>n>>m;
    for (int i=0; i<n; ++i) {
        int t;
        cin>>t;
        for (int j=0; j<t; ++j) {
            int v;
            cin>>v;
            --v;
            g[i].push_back(v);
        }
    }
    cin>>s;
    --s;

    function<void(int)> dfs=[&](int u){
        vis[u]=1;
        if (!g[u].size()) {
            st[u]=2;
            return;
        }
        int tmp=0;
        for(int i:g[u]){
            if (vis[i]) {
                if(st[i])
                    tmp|=st[i];
                else tmp|=4;
            }else{
                dfs(i);
                tmp|=st[i];
            }
        }
    //    cout<<u<<" "<<tmp<<endl;
        if (tmp&2) {
            st[u]=1;
        }else if(tmp&4){
            st[u]=4;
        }else
            st[u]=2;
    };

    dfs(s);

//    for (int i=0; i<n; ++i) {
//        cout<<st[i]<<" ";
//    }
//    cout<<endl;

    int tmp=st[s];
    if (tmp==1) {
        cout<<"Win"<<endl;
        int flag=2;
        while (g[s].size()) {
            cout<<s+1<<" ";
            for (int i:g[s]) {
                if (st[i]==flag) {
                    s=i;
                    if (flag==1) {
                        flag=2;
                    }else flag=1;
                    break;
                }
            }
        }
        cout<<s+1<<endl;
    }else if(tmp==4){
        cout<<"Draw"<<endl;
    }else
        cout<<"Lose"<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

const int MAXN = 100005;

mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());

vector<int> adj[MAXN];
vector<int> rev[MAXN];

int vis[MAXN][2];
int par[MAXN][2];
int loop;

int viss[MAXN];

void dfs(int node){
    viss[node] = 1;
    for(int i:adj[node]){
        if(viss[i]==2)continue;
        else if(viss[i]==1) loop = 1;
        else{
            dfs(i);
        }
    }
    viss[node] = 2;
}

int main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int n,m;
    cin >> n >> m;
    for(int i=0;i<n;i++){
        int c;
        cin >> c;
        for(int j=0;j<c;j++){
            int v;
            cin >> v;
            v--;
            adj[i].push_back(v);
            rev[v].push_back(i);
        }
    }
    int s;
    cin >> s;
    s--;
    // contains finishing points
    deque< pair<int,int> > q; // node , parity

    for(int i=0;i<n;i++){
        if(adj[i].size()==0){
            q.push_back({i,0});
            vis[i][0] = 1;
        }
    }

    while(q.size()){
        int parity = (q.front().second + 1)%2;
        int node = q.front().first;
        q.pop_front();

        for(int i:rev[node]){
            if(!vis[i][parity]){
                vis[i][parity] = 1;
                par[i][parity] = node;
                q.push_back({i,parity});
            }
        }
    }
    dfs(s);

    if(vis[s][1]){
        cout<<"Win\n";
        cout << s + 1<< " ";
        int pari = 1;
        while( adj[s].size() ){
            s = par[s][pari];
            cout << s+ 1 << " ";
            pari = !pari;
        }
    }
    else if( loop ){
        cout<<"Draw";
    }
    else{
        cout<<"Lose";
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

const int MAXN = 100005;

mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());

vector<int> adj[MAXN];
vector<int> rev[MAXN];

int vis[MAXN][2];
int par[MAXN][2];
int loop[MAXN];

int main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int n,m;
    cin >> n >> m;
    for(int i=0;i<n;i++){
        int c;
        cin >> c;
        for(int j=0;j<c;j++){
            int v;
            cin >> v;
            v--;
            adj[i].push_back(v);
            rev[v].push_back(i);
        }
    }
    int s;
    cin >> s;
    s--;
    // contains finishing points
    deque< pair<int,int> > q; // node , parity

    for(int i=0;i<n;i++){
        if(adj[i].size()==0){
            q.push_back({i,0});
            vis[i][0] = 1;
        }
    }

    while(q.size()){
        int parity = (q.front().second + 1)%2;
        int node = q.front().first;
        q.pop_front();

        for(int i:rev[node]){
            if(!vis[i][parity]){
                vis[i][parity] = 1;
                par[i][parity] = node;
                if(loop[node]){
                    loop[i]=1;
                }
                q.push_back({i,parity});
            }
            else{
                loop[i] = 1;
                loop[node]=1;
            }
        }
    }
    if(vis[s][1]){
        cout<<"Win\n";
        cout << s + 1<< " ";
        int pari = 1;
        while( adj[s].size() ){
            s = par[s][pari];
            cout << s+ 1 << " ";
            pari = !pari;
        }
    }
    else if( (vis[s][0]==0&&vis[s][1]==0) || loop[s] ){
        cout<<"Draw";
    }
    else{
        cout<<"Lose";
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

const int MAXN = 100005;

mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());

vector<int> adj[MAXN];
vector<int> rev[MAXN];

int vis[MAXN][2];
int par[MAXN][2];

int main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int n,m;
    cin >> n >> m;
    for(int i=0;i<n;i++){
        int c;
        cin >> c;
        for(int j=0;j<c;j++){
            int v;
            cin >> v;
            v--;
            adj[i].push_back(v);
            rev[v].push_back(i);
        }
    }
    int s;
    cin >> s;
    s--;
    // contains finishing points
    deque< pair<int,int> > q; // node , parity

    for(int i=0;i<n;i++){
        if(adj[i].size()==0){
            q.push_back({i,0});
            vis[i][0] = 1;
        }
    }

    while(q.size()){
        int parity = (q.front().second + 1)%2;
        int node = q.front().first;
        q.pop_front();

        for(int i:rev[node]){
            if(!vis[i][parity]){
                vis[i][parity] = 1;
                par[i][parity] = node;
                q.push_back({i,parity});
            }
        }
    }
    if(vis[s][1]){
        cout<<"Win\n";
        cout << s + 1<< " ";
        int pari = 1;
        while( adj[s].size() ){
            s = par[s][pari];
            cout << s+ 1 << " ";
            pari = !pari;
        }
    }
    else if(vis[s][0]==0&&vis[s][1]==0){
        cout<<"Draw";
    }
    else{
        cout<<"Lose";
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

const int MAXN = 100005;

mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());

vector<int> adj[MAXN];
vector<int> rev[MAXN];

int vis[MAXN][2];
int par[MAXN][2];

int main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int n,m;
    cin >> n >> m;
    for(int i=0;i<n;i++){
        int c;
        cin >> c;
        for(int j=0;j<c;j++){
            int v;
            cin >> v;
            v--;
            adj[i].push_back(v);
            rev[v].push_back(i);
        }
    }
    int s;
    cin >> s;
    s--;
    // contains finishing points
    deque< pair<int,int> > q; // node , parity

    for(int i=0;i<n;i++){
        if(adj[i].size()==0){
            q.push_back({i,0});
            vis[i][0] = 1;
        }
    }

    while(q.size()){
        int parity = (q.front().second + 1)%2;
        int node = q.front().first;
        q.pop_front();

        for(int i:rev[node]){
            if(!vis[i][parity]){
                vis[i][parity] = 1;
                par[i][parity] = node;
                q.push_back({i,parity});
            }
        }
    }
    if(vis[s][1]){
        cout<<"WIN ";
        cout << s + 1<< " ";
        int pari = 1;
        while( adj[s].size() ){
            s = par[s][pari];
            cout << s+ 1 << " ";
            pari = !pari;
        }
    }
    else if(vis[s][0]==0&&vis[s][1]==0){
        cout<<"DRAW";
    }
    else{
        cout<<"LOSE";
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

const int MAXN = 100005;

mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());

vector<int> adj[MAXN];
vector<int> rev[MAXN];

int vis[MAXN][2];
int par[MAXN][2];

int main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int n,m;
    cin >> n >> m;
    for(int i=0;i<n;i++){
        int c;
        cin >> c;
        for(int j=0;j<c;j++){
            int v;
            cin >> v;
            v--;
            adj[i].push_back(v);
            rev[v].push_back(i);
        }
    }
    int s;
    cin >> s;
    s--;
    // contains finishing points
    deque< pair<int,int> > q; // node , parity

    for(int i=0;i<n;i++){
        if(adj[i].size()==0){
            q.push_back({i,0});
            vis[i][0] = 1;
        }
    }

    while(q.size()){
        int parity = (q.front().second + 1)%2;
        int node = q.front().first;
        q.pop_front();

        for(int i:rev[node]){
            if(!vis[i][parity]){
                vis[i][parity] = 1;
                par[i][parity] = node;
                q.push_back({i,parity});
            }
        }
    }
    if(vis[s][1]){
        cout<<"WIN\n";
        cout << s + 1<< " ";
        int pari = 1;
        while( adj[s].size() ){
            s = par[s][pari];
            cout << s+ 1 << " ";
            pari = !pari;
        }
    }
    else if(vis[s][0]==0&&vis[s][1]==0){
        cout<<"DRAW";
    }
    else{
        cout<<"LOSE";
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());

#define int long long
#define ll long long
#define mp make_pair
#define f first
#define s second
#define pii pair<int, int>
#define all(_v) _v.begin(), _v.end()
#define sz(a) ((int)a.size())
#define what_is(x) cout << #x << " is " << x << endl;
typedef long double ld;

const ll inf = 1e17 + 7;
const int max_n = 1e5 + 5;
int n;
vector<int> gr[max_n];
int used[max_n][2];

vector<int> path;

bool draw = false;

bool dfs(int v, int st) {
    if (used[v][st]) {
        if (used[v][st] == 1)
            draw = true;
        //cout << v << " " << st << endl;
        return false;
    }

    path.emplace_back(v);
    used[v][st] = 1;
    for(int i : gr[v]) {
        if (dfs(i, 1 - st)) return true;
    }
    if (gr[v].empty() && st == 1) return true;
    path.pop_back();
    used[v][st] = 2;
    return false;
}

void solve() {
    int m;
    cin >> n >> m;
    for(int i = 0;i < n;i++) {
        int c;
        cin >> c;
        for(int j = 0;j < c;j++) {
            int to;
            cin >> to;
            to--;
            gr[i].emplace_back(to);
        }
    }

    int s;
    cin >> s;
    s--;
    dfs(s, 0);

    if (path.size()) {
        cout << "Win" << endl;
        for(int i : path)
            cout << i + 1 << " ";
    }else if (draw) cout << "Draw";
    else cout << "Lose";
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios_base::sync_with_stdio(0);
    cout.precision(10);

    solve();
}


#include <bits/stdc++.h>
using namespace std;

mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());

#define int long long
#define ll long long
#define mp make_pair
#define f first
#define s second
#define pii pair<int, int>
#define all(_v) _v.begin(), _v.end()
#define sz(a) ((int)a.size())
#define what_is(x) cout << #x << " is " << x << endl;
typedef long double ld;

const ll inf = 1e17 + 7;
const int max_n = 1e5 + 5;
int n;
vector<int> gr[max_n];
bool used[max_n][2];

vector<int> path;

bool draw = false;

bool dfs(int v, int st) {
    if (used[v][st]) {
        draw = true;
        return false;
    }

    path.emplace_back(v);
    used[v][st] = true;
    for(int i : gr[v]) {
        if (dfs(i, 1 - st)) return true;
    }
    if (gr[v].empty() && st == 1) return true;
    path.pop_back();
    return false;
}

void solve() {
    int m;
    cin >> n >> m;
    for(int i = 0;i < n;i++) {
        int c;
        cin >> c;
        for(int j = 0;j < c;j++) {
            int to;
            cin >> to;
            to--;
            gr[i].emplace_back(to);
        }
    }

    int s;
    cin >> s;
    s--;
    dfs(s, 0);

    if (path.size()) {
        cout << "Win" << endl;
        for(int i : path)
            cout << i + 1 << " ";
    }else if (draw) cout << "Draw";
    else cout << "Lose";
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios_base::sync_with_stdio(0);
    cout.precision(10);

    solve();
}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<vector>
#include<cmath>
#include<stack>
#include<set>
#include<map>
#include<queue>
#include<algorithm>
using namespace std;
#define ll long long
#define MOD 1000000007
#define INF 0x3fffffff
#define mod(x) (x%MOD)
#define CLR(a,x) memset(a,x,sizeof(a))
#define FILL(a,n,x) fill(a,a+n,x)
#define WHILE() int T;scanf("%d",&T);while(T--)
#define rep( i, l, r ) for( int i = l; i <= r; ++i )
#define pre( i, r, l ) for( int i = r; i >= l; --i )
#define mod(x) (x%MOD)
#define FILL(a,n,x)  fill(a,a+n,x)
const double PI = acos(-1.0);

const int maxn = 1e5 + 500;
int n,k;
int s,x;
vector<int> g[maxn];
bool win = false,circle = false;
int vis[maxn][2];
int sum;
vector<int> ans;

void dfs(int u, int cur)
{
    if(win == true) return ;
    if(vis[u][cur] != 0) return ;
    vis[u][cur] = 1;
    ans.push_back(u);
    if(g[u].size() == 0 && cur == 1){
        win = 1; return ;
    }
    for(auto it: g[u]){
        if(vis[it][(cur+1)%2] == 1) circle = true;
        dfs(it,(cur+1)%2);
        if(win == true) return ;
    }
    vis[u][cur] = 2;
    ans.pop_back();
}

int main()
{
    //freopen("DATA.c", "r", stdin);
    ios::sync_with_stdio(false); cin.tie();cout.tie();
    cin>>n>>k;
    rep(i,1,n){
        cin>>s;
        rep(j,1,s){
            cin>>x; g[i].push_back(x);
        }
    }
    cin>>s;
    dfs(s, 0);
    if(win){
        cout<<"Win"<<endl;
        for(int i = 0 ; i < ans.size(); i ++)
            cout<<ans[i]<<" "; cout<<endl;
    }
    else if(circle) cout<<"Draw"<<endl;
    else cout<<"Lose"<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<vector>
#include<cmath>
#include<stack>
#include<set>
#include<map>
#include<queue>
#include<algorithm>
using namespace std;
#define ll long long
#define MOD 1000000007
#define INF 0x3fffffff
#define mod(x) (x%MOD)
#define CLR(a,x) memset(a,x,sizeof(a))
#define FILL(a,n,x) fill(a,a+n,x)
#define WHILE() int T;scanf("%d",&T);while(T--)
#define rep( i, l, r ) for( int i = l; i <= r; ++i )
#define pre( i, r, l ) for( int i = r; i >= l; --i )
#define mod(x) (x%MOD)
#define FILL(a,n,x)  fill(a,a+n,x)
const double PI = acos(-1.0);

const int maxn = 1e5 + 500;
int n,k;
int s,x;
vector<int> g[maxn];
bool win,circle;
int vis[maxn][2];
int sum;
vector<int> ans;

void dfs(int u, int cur)
{
    if(win) return ;
    if(vis[u][cur] == 1) return ;
    vis[u][cur] = 1;
    ans.push_back(u);
    if(g[u].size() == 0 && cur == 1){
        win = 1; return ;
    }
    for(auto it: g[u]){
        if(vis[it][(cur+1)%2]) circle = 1;
        dfs(it,(cur+1)%2);
        if(win) return ;
        vis[it][(cur+1)%2] = 1;;
    }
    ans.pop_back();
}

int main()
{
    //freopen("DATA.c", "r", stdin);
    ios::sync_with_stdio(false); cin.tie();cout.tie();
    cin>>n>>k;
    rep(i,1,n){
        cin>>s;
        rep(j,1,s){
            cin>>x; g[i].push_back(x);
        }
    }
    cin>>s;
    dfs(s, 0);
    if(win){
        cout<<"Win"<<endl;
        for(int i = 0 ; i < ans.size(); i ++)
            cout<<ans[i]<<" "; cout<<endl;
    }
    else if(circle) cout<<"Draw"<<endl;
    else cout<<"Lose"<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<vector>
#include<cmath>
#include<stack>
#include<set>
#include<map>
#include<queue>
#include<algorithm>
using namespace std;
#define ll long long
#define MOD 1000000007
#define INF 0x3fffffff
#define mod(x) (x%MOD)
#define CLR(a,x) memset(a,x,sizeof(a))
#define FILL(a,n,x) fill(a,a+n,x)
#define WHILE() int T;scanf("%d",&T);while(T--)
#define rep( i, l, r ) for( int i = l; i <= r; ++i )
#define pre( i, r, l ) for( int i = r; i >= l; --i )
#define mod(x) (x%MOD)
#define FILL(a,n,x)  fill(a,a+n,x)
const double PI = acos(-1.0);

const int maxn = 1e5 + 500;
int n,k;
int s,x;
vector<int> g[maxn];
bool win,circle;
int vis[maxn];
int sum,ans[maxn];

void dfs(int u, int cur)
{
    if(win) return ;
    if(g[u].size() == 0){
        if(cur%2) {
            win = true;
            for(int i = 1; i <= n; i ++){
                if(vis[i]) ans[vis[i]] = i, sum ++;
            }
        }
    }
    for(auto it: g[u]){
        if(vis[it]) circle = true;
        else{
            vis[it] = cur+2;
            dfs(it,cur + 1);
            vis[it] = 0;
        }
    }
}

int main()
{
    //freopen("DATA.c", "r", stdin);
    ios::sync_with_stdio(false); cin.tie();cout.tie();
    cin>>n>>k;
    rep(i,1,n){
        cin>>s;
        rep(j,1,s){
            cin>>x; g[i].push_back(x);
        }
    }
    cin>>s;
    vis[s] = 1;
    dfs(s, 0);
    if(win){
        cout<<"Win"<<endl;
        for(int i = 1; i <= sum; i ++)
            cout<<ans[i]<<" "; cout<<endl;
    }
    else if(circle) cout<<"Draw"<<endl;
    else cout<<"Lose"<<endl;
    return 0;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
#define N 100005

int n, m;
vector<int> a[N];
int s;
int c[N],p[N];
bool z;
void dfs(int x,int d)
{
	c[x] = 1;
	if (a[x].size() == 0 && d % 2 == 1)
	{
		cout << "Win" << endl;
		vector<int> ans;
		for (int j = x; j != s; j = p[j])
			ans.push_back(j);
		ans.push_back(s);
		reverse(ans.begin(), ans.end());
		for (int i = 0; i < ans.size(); ++i)
			cout << ans[i] << ' ';
		cout << endl;
		exit(0);
	}
	for (int i = 0; i < a[x].size(); ++i)
	{
		int h = a[x][i];
		if (!c[h])
		{
			p[h] = x;
			dfs(h, d + 1);
		}
		else if (c[h] == 1)
			z = true;
	}
	c[x] = 2;
}
int main()
{
	ios_base::sync_with_stdio(0);
	cin >> n >> m;
	for (int i = 1; i <= n; ++i)
	{
		cin >> m;
		for (int j = 0; j < m; ++j)
		{
			int x;
			cin >> x;
			a[i].push_back(x);
		}
	}
	cin >> s;
	dfs(s,0);
	if (z)
		cout << "Draw" << endl;
	else
		cout << "Lose" << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
#define N 100005

int n, m;
vector<int> a[N];
int s;
int c[N];
bool ans[N][3];
void dfs(int x)
{
	c[x] = 1;
	if (!a[x].size())
		ans[x][0] = true;
	for (int i = 0; i < a[x].size(); ++i)
	{
		int h = a[x][i];
		if (c[h] == 1)
			ans[x][1] = true;
		else if (c[h] == 0)
		{
			dfs(h);
			if (ans[h][0] == true)
				ans[x][2] = true;
			if (ans[h][1])
				ans[x][1] = true;
			if (ans[h][2])
				ans[x][0] = true;
		}
		else
		{
			if (ans[h][0] == true)
				ans[x][2] = true;
			if (ans[h][1])
				ans[x][1] = true;
			if (ans[h][2])
				ans[x][0] = true;
		}
	}
	c[x] = 2;
}
int main()
{
	ios_base::sync_with_stdio(0);
	cin >> n >> m;
	for (int i = 1; i <= n; ++i)
	{
		cin >> m;
		for (int j = 0; j < m; ++j)
		{
			int x;
			cin >> x;
			a[i].push_back(x);
		}
	}
	cin >> s;
	dfs(s);
	for (int i = 1; i <= n; ++i)
		c[i] = 0;
	if (ans[s][2])
	{
		cout << "Win" << endl;
		int z = 2;
		while (1)
		{
			c[s] = 1;
			cout << s << ' ';
			if (a[s].size() == 0)
				break;
			if (z == 2)
			{
				for (int i = 0; i < a[s].size(); ++i)
				{
					int h = a[s][i];
					if (c[h])
						continue;
					if (ans[h][0] == true)
					{
						s = h;
						break;
					}
				}
			}
			else
			{
				for (int i = 0; i < a[s].size(); ++i)
				{
					int h = a[s][i];
					if (c[h])
						continue;
					if (ans[h][2] == true)
					{
						s = h;
						break;
					}
				}
			}
			if (z == 0)
				z = 2;
			else
				z = 0;
		}
		cout << endl;
		return 0;
	}
	if (ans[s][1])
		cout << "Draw" << endl;
	else
		cout << "Lose" << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define m_p make_pair
const int N=100005;

int n,m;
vector<int> a[N],b[N];
int s;

int cc[N];
bool dfs(int x)
{
    cc[x]=1;
    for(int i=0;i<a[x].size();++i)
    {
        int h=a[x][i];
        if(cc[h]==1)
            return true;
        if(cc[h]==0)
            if(dfs(h))
                return true;
    }
    cc[x]=2;
    return false;
}

bool c[N][2];
int main()
{
    cin>>n>>m;
    for(int x=1;x<=n;++x)
    {
        int mm;
        cin>>mm;
        while(mm--)
        {
            int y;
            cin>>y;
            a[x].push_back(y);
            b[y].push_back(x);
        }
    }
    cin>>s;
    queue<pair<int,int> > q;
    for(int x=1;x<=n;++x)
        if(a[x].empty())
        {
            c[x][0]=true;
            q.push(m_p(x,0));
        }
    while(!q.empty())
    {
        pair<int,int> t=q.front();
        q.pop();
        int x=t.first;
        int z=t.second;
        for(int i=0;i<b[x].size();++i)
        {
            int h=b[x][i];
            if(!c[h][z^1])
            {
                c[h][z^1]=true;
                q.push(m_p(h,z^1));
            }
        }
    }
    if(c[s][1])
    {
        cout<<"Win"<<endl;
        int x=s,z=1;
        while(1)
        {
            cout<<x<<' ';
            if(a[x].empty())
                break;
            for(int i=0;i<a[x].size();++i)
            {
                int h=a[x][i];
                if(c[h][z^1])
                {
                    x=h;
                    z^=1;
                    break;
                }
            }
        }
        cout<<endl;
    }
    else
    {
        if(dfs(s))
            cout<<"Draw"<<endl;
        else
            cout<<"Lose"<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define m_p make_pair
const int N=100005;

int n,m;
vector<int> a[N],b[N];
int s;

int cc[N];
bool dfs(int x)
{
    cc[x]=1;
    for(int i=0;i<a[x].size();++i)
    {
        int h=a[x][i];
        if(cc[h]==1)
            return true;
        if(cc[h]==0)
            if(dfs(h))
                return true;
    }
    cc[x]=2;
    return false;
}

bool c[N][2];
int p[N][2];
int main()
{
    cin>>n>>m;
    for(int x=1;x<=n;++x)
    {
        int mm;
        cin>>mm;
        while(mm--)
        {
            int y;
            cin>>y;
            a[x].push_back(y);
            b[y].push_back(x);
        }
    }
    cin>>s;
    queue<pair<int,int> > q;
    for(int x=1;x<=n;++x)
        if(a[x].empty())
        {
            c[x][0]=true;
            q.push(m_p(x,0));
        }
    while(!q.empty())
    {
        pair<int,int> t=q.front();
        q.pop();
        int x=t.first;
        int z=t.second;
        for(int i=0;i<b[x].size();++i)
        {
            int h=b[x][i];
            if(!c[h][z^1])
            {
                c[h][z^1]=true;
                p[h][z^1]=x;
                q.push(m_p(h,z^1));
            }
        }
    }
    if(c[s][1])
    {
        cout<<"Win"<<endl;
        int x=s,z=1;
        while(1)
        {
            cout<<x<<' ';
            if(a[x].empty())
                break;
            x=p[x][z];
            z^=1;
        }
        cout<<endl;
    }
    else
    {
        if(dfs(s))
            cout<<"Draw"<<endl;
        else
            cout<<"Lose"<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()

vector < vector <ll> > outdeg;
vector <ll> path, vis, ans;
ll ansflag;

void dfs(ll u, ll cnt) {

    if (path.size() < 1e6)
        path.pb(u);
    else {
        return;
    }

    vis[u] = 1;
    if (cnt & 1)
        if (!outdeg[u].size()) {
            ansflag = 1;
            copy(path.begin(), path.end(), back_inserter(ans));
        }
    for (auto v : outdeg[u]) {
        if (!vis[v]) {
            dfs(v, cnt + 1);
        } else if (vis[v] == 1) {
            if (ansflag != 1)
                ansflag = 2;
        }
    }

    vis[u] = 2;
    path.pop_back();
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    ll n, m;
    cin >> n >> m;

    vis.assign(n + 1, 0);
    outdeg.resize(n + 1);
    for (ll i = 1; i <= n; i++) {
        ll out;
        cin >> out;

        if (out) {
            while (out--) {
                ll v;
                cin >> v;
                outdeg[i].pb(v);
            }
        }
    }

    ll s;
    cin >> s;

    dfs(s, 0);
    if (!ansflag)
        cout << "Lose\n";
    else if (ansflag == 1) {
        cout << "Win\n";
        for (auto x : ans)
            cout << x << ' ';
        cout << '\n';
    } else {
        cout << "Draw\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()

vector < vector <ll> > outdeg;
vector <ll> path, vis[2];
bool lose;

void dfs(ll u, ll p) {
    if (vis[p][u] == 1) {
        lose = 0;
        return;
    }
    if (vis[p][u] == 2)
        return;

    path.pb(u);
    if (p && !outdeg[u].size()) {
        cout << "Win\n";
        for (auto x : path)
            cout << x << ' ';
        cout << '\n';
        exit(0);
    }

    vis[p][u] = 1;
    for (auto v : outdeg[u])
        dfs(v, p ^ 1);

    vis[p][u] = 2;
    path.pop_back();

}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    ll n, m;
    cin >> n >> m;

    vis[0].assign(n + 1, 0);
    vis[1].assign(n + 1, 0);
    outdeg.resize(n + 1);
    for (ll i = 1; i <= n; i++) {
        ll out;
        cin >> out;

        if (out) {
            while (out--) {
                ll v;
                cin >> v;
                outdeg[i].pb(v);
            }
        }
    }

    ll s;
    cin >> s;

    lose = 1;
    dfs(s, 0);
    if (lose)
        cout << "Lose\n";
    else {
        cout << "Draw\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()

vector < vector <ll> > outdeg;
vector <ll> path, vis, ans;
ll ansflag;

void dfs(ll u, ll cnt) {
    if (ansflag != 1)
        path.pb(u);

    vis[u] = 1;
    if (cnt & 1)
        if (!outdeg[u].size()) {
            ansflag = 1;
            copy(path.begin(), path.end(), back_inserter(ans));
            path.clear();
            return;
        }
    for (auto v : outdeg[u]) {
        if (!vis[v]) {
            dfs(v, cnt + 1);
        } else if (vis[v] == 1) {
            if (ansflag != 1)
                ansflag = 2;
        }
    }

    vis[u] = 2;
    // if (ansflag != 1)
        path.pop_back();
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    ll n, m;
    cin >> n >> m;

    vis.assign(n + 1, 0);
    outdeg.resize(n + 1);
    for (ll i = 1; i <= n; i++) {
        ll out;
        cin >> out;

        if (out) {
            while (out--) {
                ll v;
                cin >> v;
                outdeg[i].pb(v);
            }
        }
    }

    ll s;
    cin >> s;

    dfs(s, 0);
    if (!ansflag)
        cout << "Lose\n";
    else if (ansflag == 1) {
        cout << "Win\n";
        for (auto x : ans)
            cout << x << ' ';
        cout << '\n';
    } else {
        cout << "Draw\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()

vector < vector <ll> > outdeg;
vector <ll> path, vis, ans;
ll ansflag;

void dfs(ll u, ll cnt) {

    path.pb(u);
    vis[u] = 1;
    if (cnt & 1)
        if (!outdeg[u].size()) {
            ansflag = 1;
            cout << "Win\n";
            for (auto x : path)
                cout << x << ' ';
            cout << '\n';
            exit(0);
        }
    for (auto v : outdeg[u]) {
        if (!vis[v]) {
            dfs(v, cnt + 1);
        } else if (vis[v] == 1) {
            if (ansflag != 1)
                ansflag = 2;
        }
    }

    vis[u] = 2;
    path.pop_back();
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    ll n, m;
    cin >> n >> m;

    vis.assign(n + 1, 0);
    outdeg.resize(n + 1);
    for (ll i = 1; i <= n; i++) {
        ll out;
        cin >> out;

        if (out) {
            while (out--) {
                ll v;
                cin >> v;
                outdeg[i].pb(v);
            }
        }
    }

    ll s;
    cin >> s;

    dfs(s, 0);
    if (!ansflag)
        cout << "Lose\n";
    else {
        cout << "Draw\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()

vector < vector <ll> > outdeg;
vector <ll> path, vis, ans;
ll ansflag;

void dfs(ll u, ll cnt) {
    if (ansflag != 1)
        path.pb(u);

    vis[u] = 1;
    if (cnt & 1)
        if (!outdeg[u].size()) {
            ansflag = 1;
            copy(path.begin(), path.end(), back_inserter(ans));
            path.clear();
            return;
        }
    for (auto v : outdeg[u]) {
        if (!vis[v]) {
            dfs(v, cnt + 1);
        } else if (vis[v] == 1) {
            if (ansflag != 1)
                ansflag = 2;
        }
    }

    vis[u] = 2;
    if (ansflag != 1)
        path.pop_back();
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    ll n, m;
    cin >> n >> m;

    vis.assign(n + 1, 0);
    outdeg.resize(n + 1);
    for (ll i = 1; i <= n; i++) {
        ll out;
        cin >> out;

        if (out) {
            while (out--) {
                ll v;
                cin >> v;
                outdeg[i].pb(v);
            }
        }
    }

    ll s;
    cin >> s;

    dfs(s, 0);
    if (!ansflag)
        cout << "Lose\n";
    else if (ansflag == 1) {
        cout << "Win\n";
        for (auto x : ans)
            cout << x << ' ';
        cout << '\n';
    } else {
        cout << "Draw\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()

vector < vector <ll> > outdeg;
vector <ll> path, vis, ans;
ll ansflag;

void dfs(ll u, ll cnt) {
    path.pb(u);
    vis[u] = 1;
    if (cnt & 1)
        if (!outdeg[u].size()) {
            ansflag = 1;
            copy(path.begin(), path.end(), back_inserter(ans));
            return;
        }
    for (auto v : outdeg[u]) {
        if (!vis[v]) {
            dfs(v, cnt + 1);
        } else if (vis[v] == 1) {
            if (ansflag != 1)
                ansflag = 2;
        }
    }

    vis[u] = 2;
    path.pop_back();
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    ll n, m;
    cin >> n >> m;

    vis.assign(n + 1, 0);
    outdeg.resize(n + 1);
    for (ll i = 1; i <= n; i++) {
        ll out;
        cin >> out;

        if (out) {
            while (out--) {
                ll v;
                cin >> v;
                outdeg[i].pb(v);
            }
        }
    }

    ll s;
    cin >> s;

    dfs(s, 0);
    if (!ansflag)
        cout << "Lose\n";
    else if (ansflag == 1) {
        cout << "Win\n";
        for (auto x : ans)
            cout << x << ' ';
        cout << '\n';
    } else {
        cout << "Draw\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()

vector < vector <ll> > outdeg;
vector <ll> path, vis[2];
bool lose;

void dfs(ll u, ll p) {
    if (vis[p][u] == 1) {
        lose = 0;
        return;
    }
    if (vis[p][u] == 2)
        return;

    vis[p][u] = 1;
    path.pb(u);
    for (auto v : outdeg[u])
        dfs(v, p ^ 1);

    if (p && !outdeg[u].size()) {
        cout << "Win\n";
        for (auto x : path)
            cout << x << ' ';
        cout << '\n';
        exit(0);
    }

    vis[p][u] = 2;
    path.pop_back();

}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    ll n, m;
    cin >> n >> m;

    vis[0].assign(n + 1, 0);
    vis[1].assign(n + 1, 0);
    outdeg.resize(n + 1);
    for (ll i = 1; i <= n; i++) {
        ll out;
        cin >> out;

        if (out) {
            while (out--) {
                ll v;
                cin >> v;
                outdeg[i].pb(v);
            }
        }
    }

    ll s;
    cin >> s;

    lose = 1;
    dfs(s, 0);
    if (lose)
        cout << "Lose\n";
    else {
        cout << "Draw\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()

vector < vector <ll> > g;
vector <ll> path, outdeg, vis, ans;
ll ansflag;

void dfs(ll u, ll cnt) {
    path.pb(u);
    vis[u] = 1;
    if (cnt & 1)
        if (!outdeg[u]) {
            ansflag = 1;
            copy(path.begin(), path.end(), back_inserter(ans));
        }
    for (auto v : g[u]) {
        if (!vis[v]) {
            dfs(v, cnt + 1);
        } else if (vis[v] == 1) {
            if (ansflag != 1)
                ansflag = 2;
        }
    }

    vis[u] = 2;
    path.pop_back();
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    ll n, m;
    cin >> n >> m;

    g.resize(n + 1);
    vis.assign(n + 1, 0);
    outdeg.resize(n + 1);
    for (ll i = 1; i <= n; i++) {
        ll out;
        cin >> out;

        outdeg[i] = out;
        if (out) {
            while (out--) {
                ll v;
                cin >> v;
                g[i].pb(v);
            }
        }
    }

    ll s;
    cin >> s;

    dfs(s, 0);
    if (!ansflag)
        cout << "Lose\n";
    else if (ansflag == 1) {
        cout << "Win\n";
        for (auto x : ans)
            cout << x << ' ';
        cout << '\n';
    } else {
        cout << "Draw\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()

vector < vector <ll> > outdeg;
vector <ll> path, vis, ans;
bool win, lose;

void dfs(ll u, ll cnt) {

    if (vis[u] == 1) {
        lose = 0;
        return;
    }

    if (vis[u] == 2 || win) {
        return;
    }

    path.pb(u);
    vis[u] = 1;
    if (cnt & 1)
        if (!outdeg[u].size()) {
            win = 1;
        }

    for (auto v : outdeg[u]) {
        dfs(v, cnt + 1);
    }

    vis[u] = 2;

    if (!win)
        path.pop_back();
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    ll n, m;
    cin >> n >> m;

    vis.assign(n + 1, 0);
    outdeg.resize(n + 1);
    for (ll i = 1; i <= n; i++) {
        ll out;
        cin >> out;

        if (out) {
            while (out--) {
                ll v;
                cin >> v;
                outdeg[i].pb(v);
            }
        }
    }

    ll s;
    cin >> s;

    win = 0, lose = 1;
    dfs(s, 0);
    if (win) {
        cout << "Win\n";
        for (auto x : path)
            cout << x << ' ';
        cout << '\n';
    } else if (lose)
        cout << "Lose\n";
    else {
        cout << "Draw\n";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()

vector < vector <ll> > outdeg;
vector <ll> path, vis, ans;
ll ansflag;

void dfs(ll u, ll cnt) {
    if (!ansflag) {
        path.pb(u);
        vis[u] = 1;
        if (cnt & 1)
            if (!outdeg[u].size()) {
                ansflag = 1;
                copy(path.begin(), path.end(), back_inserter(ans));
                path.clear();
            }
        for (auto v : outdeg[u]) {
            if (!vis[v]) {
                dfs(v, cnt + 1);
            } else if (vis[v] == 1) {
                if (ansflag != 1)
                    ansflag = 2;
            }
        }

        vis[u] = 2;
        path.pop_back();
    }
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    ll n, m;
    cin >> n >> m;

    vis.assign(n + 1, 0);
    outdeg.resize(n + 1);
    for (ll i = 1; i <= n; i++) {
        ll out;
        cin >> out;

        if (out) {
            while (out--) {
                ll v;
                cin >> v;
                outdeg[i].pb(v);
            }
        }
    }

    ll s;
    cin >> s;

    dfs(s, 0);
    if (!ansflag)
        cout << "Lose\n";
    else if (ansflag == 1) {
        cout << "Win\n";
        for (auto x : ans)
            cout << x << ' ';
        cout << '\n';
    } else {
        cout << "Draw\n";
    }
    return 0;
}


#include <bits/stdc++.h>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <utility>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <iomanip>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//setbase - cout << setbase (16); cout << 100 << endl; Prints 64
//setfill -   cout << setfill ('x') << setw (5); cout << 77 << endl; prints xxx77
//setprecision - cout << setprecision (14) << f << endl; Prints x.xxxx
//cout.precision(x)  cout<<fixed<<val;  // prints x digits after decimal in val

using namespace std;
using namespace __gnu_pbds;
 	// find_by_order()  // order_of_key
typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
#define f(i,a,b) for(ll i=a;i<b;i++)
#define fi(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) f(i,0,n)
#define fd(i,a,b) for(ll i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define vi vector< int >
#define vl vector< ll >
#define ss second
#define ff first
#define ll long long
#define pii pair< int,int >
#define pll pair< ll,ll >
#define sz(a) a.size()
#define inff (1000*1000*1000+5)
#define all(a) a.begin(),a.end()
#define tri pair<int,pii>
#define vii vector<pii>
#define vll vector<pll>
#define viii vector<tri>
#define pqueue priority_queue< int >
#define pdqueue priority_queue< int,vi ,greater< int > >
#define flush fflush(stdout)
#define primeDEN 727999983
#define SPEED ios_base::sync_with_stdio(false) ;cin.tie(NULL) ;cout.tie(NULL) ;
#define fp(i,a,n) for(ll i=n-1; i>a ;i--)
#define deb(x) cout << #x << " ---> " << x << endl;
#define X first
#define Y second
#define pia 3.1415926536
#define mod 1000000007
#define mod2 998244353

#define ml map<ll,ll>
#define mll map<pll,ll>
#define vvl vector<vl>
#define vvi vector<vi>
#define letsh(a,b) a<<b
#define rigsh(a,b) a>>b
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count()) ;
		bool sortbysec(const pair<int,int> &a,
		      const pair<int,int> &b)
		{
		    return (a.second < b.second);
		}

		  ll power(ll a,ll n)
		{
		ll ans=1;
		while(n)
		{
		if(n&1) ans=(ans*a)%mod;
		a=(a*a)%mod ;
		n=n>>1;
		 }
		 return ans;
		}
		ll power2(ll a,ll n)
		{
		ll ans =1 ;
		while(n)
		{
			if(n&1) ans =(ans*a) ;
			a = (a*a) ;
			n =n>>1 ;
		  }
		  return ans ;
		}
		ll lcm(ll a, ll b)
		{
		       return a / __gcd(a, b) * b;
		}
#define N 1e5 +30
 vll dir({{-1,0} ,{0,-1} ,{1,0} ,{0,1}}) ;

 bool inside(int x, int y)
       {
        	return 1 <= min(x, y) && x <=N && y <=N ;
       }
void add(ll &a ,ll b)
{
	 a +=b ;
	 if(a >mod)  a %=mod ;
}
void sub(ll &a ,ll b)
{
	a -=b ;
	if(a<0 ) a +=mod ;

}
ll f=1 ;vvl g(N) ;vector<bool> vis0,vis1 ;ll ff=0;
vl ans ;
     void go(int u,int v)
	 {

	 	if(g[u].size() ==0 && v==0)
	 	{
	 	  cout<<"Win"<<endl ;ans.pb(u) ;f =0 ;return ;
		 }
		 for(auto e:g[u])
		 {
		 	if(vis0[e] || vis1[e]) ff=1 ;
		 	if(vis0[e] ==1 && v== 1) continue ;
		 	if(vis1[e] == 1 && v==0 )continue ;
		 	if(v==1) vis0[e] =1 ;
		 	else vis1[e] =1 ;
		 	go(e,(v+1)%2) ;
		 	if(!f)
		 	{
		 ans.pb(u) ;return ;
			 }
		 }
	  }
	void solve()
	    {
	      ll n,m ;cin>>n>>m ;
	      ll x ;vis0.resize(n+3,0) ,vis1.resize(n+5,0) ;

	      f(i,1,n+1)
	      {
	      	cin>>x ;
	      	ll y ;
	      	f(j,0,x) cin>>y ,g[i].pb(y) ;
		  }
		  ll s ;cin>>s ;
		  vis1[s] =1 ;
		  go(s,1) ;
	      if(!f)
	      {
	      	reverse(all(ans)) ;
	      	f(i,0,ans.size())cout<<ans[i]<<" " ;return ;
		  }
	      if(ff)
	      {
	      	cout<<"Draw"<<endl ;return ;
		  }
		  cout<<"Lose"<<endl ;return ;
	    }

 			  int main()
	  	{
	    SPEED
	     ll t  =1 ;

	     while(t--) solve() ;
	    }


#include <bits/stdc++.h>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <utility>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <iomanip>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//setbase - cout << setbase (16); cout << 100 << endl; Prints 64
//setfill -   cout << setfill ('x') << setw (5); cout << 77 << endl; prints xxx77
//setprecision - cout << setprecision (14) << f << endl; Prints x.xxxx
//cout.precision(x)  cout<<fixed<<val;  // prints x digits after decimal in val

using namespace std;
using namespace __gnu_pbds;
 	// find_by_order()  // order_of_key
typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
#define f(i,a,b) for(ll i=a;i<b;i++)
#define fi(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) f(i,0,n)
#define fd(i,a,b) for(ll i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define vi vector< int >
#define vl vector< ll >
#define ss second
#define ff first
#define ll long long
#define pii pair< int,int >
#define pll pair< ll,ll >
#define sz(a) a.size()
#define inff (1000*1000*1000+5)
#define all(a) a.begin(),a.end()
#define tri pair<int,pii>
#define vii vector<pii>
#define vll vector<pll>
#define viii vector<tri>
#define pqueue priority_queue< int >
#define pdqueue priority_queue< int,vi ,greater< int > >
#define flush fflush(stdout)
#define primeDEN 727999983
#define SPEED ios_base::sync_with_stdio(false) ;cin.tie(NULL) ;cout.tie(NULL) ;
#define fp(i,a,n) for(ll i=n-1; i>a ;i--)
#define deb(x) cout << #x << " ---> " << x << endl;
#define X first
#define Y second
#define pia 3.1415926536
#define mod 1000000007
#define mod2 998244353

#define ml map<ll,ll>
#define mll map<pll,ll>
#define vvl vector<vl>
#define vvi vector<vi>
#define letsh(a,b) a<<b
#define rigsh(a,b) a>>b
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count()) ;
		bool sortbysec(const pair<int,int> &a,
		      const pair<int,int> &b)
		{
		    return (a.second < b.second);
		}

		  ll power(ll a,ll n)
		{
		ll ans=1;
		while(n)
		{
		if(n&1) ans=(ans*a)%mod;
		a=(a*a)%mod ;
		n=n>>1;
		 }
		 return ans;
		}
		ll power2(ll a,ll n)
		{
		ll ans =1 ;
		while(n)
		{
			if(n&1) ans =(ans*a) ;
			a = (a*a) ;
			n =n>>1 ;
		  }
		  return ans ;
		}
		ll lcm(ll a, ll b)
		{
		       return a / __gcd(a, b) * b;
		}
#define N 1e5 +30
 vll dir({{-1,0} ,{0,-1} ,{1,0} ,{0,1}}) ;

 bool inside(int x, int y)
       {
        	return 1 <= min(x, y) && x <=N && y <=N ;
       }
void add(ll &a ,ll b)
{
	 a +=b ;
	 if(a >mod)  a %=mod ;
}
void sub(ll &a ,ll b)
{
	a -=b ;
	if(a<0 ) a +=mod ;

}
ll f=1 ;vvl g(N) ;vector<bool> vis0,vis1 ;ll ff=0;
vector<int> vis ;
vl ans ;
     void go(int u,int v)
	 {
	 	vis[u] =1 ;
	   	if(g[u].size() ==0 && v==0)
	 	 {
	 	  cout<<"Win"<<endl ;ans.pb(u) ;f =0 ;return ;
		 }
		 for(auto e:g[u])
		 {
		 	if(vis[e] ==1 )ff=1;
		 	if(vis0[e] ==1 && v== 1) continue ;
		 	if(vis1[e] == 1 && v==0 )continue ;
		 	if(v==1) vis0[e] =1 ;
		 	else vis1[e] =1 ;
		 	go(e,(v+1)%2) ;
		 	if(!f)
		 	{
		 ans.pb(u) ;return ;
			 }
		 }
		 vis[u] =2 ;
	  }
	void solve()
	    {
	      ll n,m ;cin>>n>>m ;
	      ll x ;vis0.resize(n+3,0) ,vis1.resize(n+5,0) ;
	      vis.resize(n+4,0) ;
	      f(i,1,n+1)
	      {
	      	cin>>x ;
	      	ll y ;
	      	f(j,0,x) cin>>y ,g[i].pb(y) ;
		  }
		  ll s ;cin>>s ;
		  vis1[s] =1 ;
		  go(s,1) ;
	      if(!f)
	      {
	      	reverse(all(ans)) ;
	      	f(i,0,ans.size())cout<<ans[i]<<" " ;return ;
		  }
	      if(ff)
	      {
	      	cout<<"Draw"<<endl ;return ;
		  }
		  cout<<"Lose"<<endl ;return ;
	    }

 			  int main()
	  	{
	     SPEED
	     ll t  =1 ;
         while(t--) solve() ;
	    }


#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define REP(i, n) rep(i, 0, n)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e12;

int n, m, s;
vector<int> G[100010];
int d[100010][2];
int prv[100010][2];

const int MAX_V = 100010;
int V;
// vector<int> G[MAX_V];
vector<int> rG[MAX_V];
vector<int> vs;     //帰りがけの順の並び
bool used[MAX_V];
int cmp[MAX_V];     //属する強連結成分のトポロジカル順序

void add_edge(int from, int to){
    G[from]. push_back(to);
    rG[to]. push_back(from);
}

void dfs(int v){
    used[v] = true;
    for(int i = 0; i < G[v].size(); i++){
        if(!used[G[v][i]]) dfs(G[v][i]);
    }
    vs. push_back(v);
}

void rdfs(int v, int k){
    used[v] = true;
    cmp[v] = k;
    for(int i = 0; i < rG[v].size(); i++){
        if(!used[rG[v][i]]) rdfs(rG[v][i], k);
    }
}

int scc(){
    memset(used, 0, sizeof(used));
    vs.clear();
    for(int v = 0; v < V; v++){
        if(!used[v]) dfs(v);
    }
    memset(used, 0, sizeof(used));
    int k = 0;
    for(int i = vs.size() - 1; i >= 0; i--){
        if(!used[vs[i]]) rdfs(vs[i], k++);
    }
    return k;
}

void dijkstra(){
    rep(i, 0, 100010) rep(j, 0, 2) d[i][j] = INF;
    d[s][0] = 0;
    prv[s][0] = -1;
    queue<P> q;
    q.push(P(d[s][0], s));
    while(!q.empty()){
        P p = q.front(); q.pop();
        int from = p.second;
        int cost = p.first;
        // if(d[from][cost % 2] != INF) continue;
        rep(i, 0, G[from].size()){
            int next = G[from][i];
            int newCost = (cost + 1) % 2;
            // cout << from << ' ' << next << ' ' << newCost << endl;
            if(d[next][newCost % 2] == INF){
                d[next][newCost % 2] = newCost % 2;
                prv[next][newCost % 2] = from;
                q.push(P(newCost % 2, next));
            }
        }
    }
}

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> n >> m;
    V = n;
    vector<int> leef;
    rep(i, 0, n){
        int k;
        cin >> k;
        if(k == 0) leef.push_back(i);
        rep(j, 0, k){
            int v;
            cin >> v;
            v--;
            add_edge(i, v);
        }
    }
    cin >> s;
    s--;
    if(m == 0){
        cout << "Lose" << endl;
        return 0;
    }
    vector<int> ans;
    dijkstra();
    rep(i, 0, leef.size()){
        if(d[leef[i]][1] != INF){
            int now = leef[i];
            int st = 1;
            while(now != -1){
                ans.push_back(now);
                now = prv[now][st];
                st = (st + 1) % 2;
            }
            reverse(all(ans));
        }
    }
    if(ans.size() != 0){
        cout << "Win" << endl;
        for(int ii = 0; ii < ans.size(); ii++){
            if(ii) cout << ' ';
            cout << ans[ii] + 1;
        }
        cout << endl;
    }else{
        int k = scc();
        // cout << k << endl;
        if(k == n){
            cout << "Lose" << endl;
        }else{
            cout << "Draw" << endl;
        }
    }
}


#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define REP(i, n) rep(i, 0, n)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e12;

int n, m, s;
vector<int> GG[100010];
int d[100010][2];
int prv[100010][2];

const int MAX_V = 100010;
int V;
vector<int> G[MAX_V];
vector<int> rG[MAX_V];
vector<int> vs;     //帰りがけの順の並び
bool used[MAX_V];
int cmp[MAX_V];     //属する強連結成分のトポロジカル順序

void add_edge(int from, int to){
    G[from]. push_back(to);
    rG[to]. push_back(from);
}

void dfs(int v){
    used[v] = true;
    for(int i = 0; i < G[v].size(); i++){
        if(!used[G[v][i]]) dfs(G[v][i]);
    }
    vs. push_back(v);
}

void rdfs(int v, int k){
    used[v] = true;
    cmp[v] = k;
    for(int i = 0; i < rG[v].size(); i++){
        if(!used[rG[v][i]]) rdfs(rG[v][i], k);
    }
}

int scc(){
    memset(used, 0, sizeof(used));
    vs.clear();
    for(int v = 0; v < V; v++){
        if(!used[v]) dfs(v);
    }
    memset(used, 0, sizeof(used));
    int k = 0;
    for(int i = vs.size() - 1; i >= 0; i--){
        if(!used[vs[i]]) rdfs(vs[i], k++);
    }
    return k;
}

void dijkstra(){
    rep(i, 0, 100010) rep(j, 0, 2) d[i][j] = INF;
    d[s][0] = 0;
    prv[s][0] = -1;
    queue<P> q;
    q.push(P(d[s][0], s));
    while(!q.empty()){
        P p = q.front(); q.pop();
        int from = p.second;
        int cost = p.first;
        // if(d[from][cost % 2] != INF) continue;
        rep(i, 0, GG[from].size()){
            int next = GG[from][i];
            int newCost = (cost + 1) % 2;
            // cout << from << ' ' << next << ' ' << newCost << endl;
            if(d[next][newCost % 2] == INF){
                d[next][newCost % 2] = newCost % 2;
                prv[next][newCost % 2] = from;
                q.push(P(newCost % 2, next));
            }
        }
    }
}

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> n >> m;
    V = n;
    vector<int> leef;
    rep(i, 0, n){
        int k;
        cin >> k;
        if(k == 0) leef.push_back(i);
        rep(j, 0, k){
            int v;
            cin >> v;
            v--;
            GG[i].push_back(v);
            // add_edge(i, v);
        }
    }
    cin >> s;
    s--;
    if(m == 0){
        cout << "Lose" << endl;
        return 0;
    }
    vector<int> ans;
    dijkstra();
    rep(i, 0, leef.size()){
        if(d[leef[i]][1] != INF){
            int now = leef[i];
            int st = 1;
            while(now != -1){
                ans.push_back(now);
                now = prv[now][st];
                st = (st + 1) % 2;
            }
            reverse(all(ans));
            break;
        }
    }
    if(ans.size() != 0){
        cout << "Win" << endl;
        for(int ii = 0; ii < ans.size(); ii++){
            if(ii) cout << ' ';
            cout << ans[ii] + 1;
        }
        cout << endl;
    }else{
        int cnt = 0;
        rep(i, 0, n){
            if(d[i][0] == INF && d[i][1] == INF) continue;
            // cout << i << endl;
            cnt++;
            rep(j, 0, GG[i].size()){
                add_edge(i, GG[i][j]);
            }
        }
        int k = scc();
        // cout << k << " " << cnt << endl;
        if(k == n){
            cout << "Lose" << endl;
        }else{
            cout << "Draw" << endl;
        }
    }
}


#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define REP(i, n) rep(i, 0, n)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e12;

int n, m, s;
vector<int> GG[100010];
int d[100010][2];
int prv[100010][2];

const int MAX_V = 100010;
int V;
vector<int> G[MAX_V];
vector<int> rG[MAX_V];
vector<int> vs;     //帰りがけの順の並び
bool used[MAX_V];
int cmp[MAX_V];     //属する強連結成分のトポロジカル順序

void add_edge(int from, int to){
    G[from]. push_back(to);
    rG[to]. push_back(from);
}

void dfs(int v){
    used[v] = true;
    for(int i = 0; i < G[v].size(); i++){
        if(!used[G[v][i]]) dfs(G[v][i]);
    }
    vs. push_back(v);
}

void rdfs(int v, int k){
    used[v] = true;
    cmp[v] = k;
    for(int i = 0; i < rG[v].size(); i++){
        if(!used[rG[v][i]]) rdfs(rG[v][i], k);
    }
}

int scc(){
    memset(used, 0, sizeof(used));
    vs.clear();
    for(int v = 0; v < V; v++){
        if(!used[v]) dfs(v);
    }
    memset(used, 0, sizeof(used));
    int k = 0;
    for(int i = vs.size() - 1; i >= 0; i--){
        if(!used[vs[i]]) rdfs(vs[i], k++);
    }
    return k;
}

void dijkstra(){
    rep(i, 0, 100010) rep(j, 0, 2) d[i][j] = INF;
    d[s][0] = 0;
    prv[s][0] = -1;
    queue<P> q;
    q.push(P(d[s][0], s));
    while(!q.empty()){
        P p = q.front(); q.pop();
        int from = p.second;
        int cost = p.first;
        // if(d[from][cost % 2] != INF) continue;
        rep(i, 0, GG[from].size()){
            int next = GG[from][i];
            int newCost = (cost + 1) % 2;
            // cout << from << ' ' << next << ' ' << newCost << endl;
            if(d[next][newCost % 2] == INF){
                d[next][newCost % 2] = newCost % 2;
                prv[next][newCost % 2] = from;
                q.push(P(newCost % 2, next));
            }
        }
    }
}

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> n >> m;
    V = n;
    vector<int> leef;
    rep(i, 0, n){
        int k;
        cin >> k;
        if(k == 0) leef.push_back(i);
        rep(j, 0, k){
            int v;
            cin >> v;
            v--;
            GG[i].push_back(v);
            // add_edge(i, v);
        }
    }
    cin >> s;
    s--;
    if(m == 0){
        cout << "Lose" << endl;
        return 0;
    }
    vector<int> ans;
    dijkstra();
    rep(i, 0, leef.size()){
        if(d[leef[i]][1] != INF){
            int now = leef[i];
            int st = 1;
            while(now != -1){
                ans.push_back(now);
                now = prv[now][st];
                st = (st + 1) % 2;
            }
            reverse(all(ans));
        }
    }
    if(ans.size() != 0){
        cout << "Win" << endl;
        for(int ii = 0; ii < ans.size(); ii++){
            if(ii) cout << ' ';
            cout << ans[ii] + 1;
        }
        cout << endl;
    }else{
        int cnt = 0;
        rep(i, 0, n){
            if(d[i][0] == INF && d[i][1] == INF) continue;
            cnt++;
            rep(j, 0, GG[i].size()){
                add_edge(i, GG[i][j]);
            }
        }
        int k = scc();
        // cout << k << endl;
        if(k == cnt){
            cout << "Lose" << endl;
        }else{
            cout << "Draw" << endl;
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define fore(i,s,e) for(int i=s;i<e;i++)
#define pb push_back
vector<int>v[100001],st,r;
short visited[100001];
int n,m,a,b,c,s,l; // L=0->Loose,L=1->Win,L=2->Draw
void dfs(int x,int steps){
  if(visited[x]<3){
    visited[x]++;st.pb(x);
    for(int i=0;i<v[x].size()&&l!=1;i++){
      fore(k,0,r.size()){
        if(v[x][i]==r[k]){
          if(!(steps%2)){
            st.pb(v[x][i]);cout<<"Win"<<endl;
            fore(i,0,st.size())cout<<st[i]+1<<" ";
            l=1;return;
          } else {
            l=0;
          }
        }
      }
      dfs(v[x][i],steps+1);
      st.pop_back();
    }
  }
}
int main() {
  cin>>n>>m;
  fore(i,0,n){
    cin>>c;fore(j,0,c){
      cin>>a;v[i].pb(a-1);
    }
    if(!c)r.pb(i);
  }cin>>s;
  if(!r.size()){cout<<"Draw"<<endl;return 0;}
  dfs(s-1,0);
  if(!l)cout<<"Lose"<<endl;
  else if(l==2)cout<<"Draw"<<endl;
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fore(i,s,e) for(int i=s;i<e;i++)
#define pb push_back
vector<int>v[100001],st,r;
int n,m,a,b,c,s,l; // L=0->Loose,L=1->Win,L=2->Draw
void dfs(int x,int steps){
  st.pb(x);
  for(int i=0;i<v[x].size()&&l!=1;i++){
    fore(k,0,r.size()){
      if(v[x][i]==r[k]){
        if(!(steps%2)){
          st.pb(v[x][i]);cout<<"Win"<<endl;
          fore(i,0,st.size())cout<<st[i]+1<<" ";
          l=1;return;
        } else {
          l=0;
        }
      }
    }
    dfs(v[x][i],steps+1);
    st.pop_back();
  }
}
int main() {
  cin>>n>>m;
  fore(i,0,n){
    cin>>c;fore(j,0,c){
      cin>>a;v[i].pb(a-1);
    }
    if(!c)r.pb(i);
  }cin>>s;
  if(!r.size()){cout<<"Draw"<<endl;return 0;}
  dfs(s-1,0);
  if(!l)cout<<"Lose"<<endl;
  else if(l==2)cout<<"Draw"<<endl;
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fore(i,s,e) for(int i=s;i<e;i++)
#define pb push_back
vector<int>v[1000001],st,r;
int n,m,a,b,c,s,l; // L=0->Loose,L=1->Win,L=2->Draw
void dfs(int x,int steps){
  st.pb(x);
  for(int i=0;i<v[x].size()&&l!=1;i++){
    fore(k,0,r.size()){
      if(v[x][i]==r[k]){
        if(!(steps%2)){
          st.pb(v[x][i]);cout<<"Win"<<endl;
          fore(i,0,st.size())cout<<st[i]+1<<" ";
          l=1;return;
        } else {
          l=0;
        }
      }
    }
    dfs(v[x][i],steps+1);
    st.pop_back();
  }
}
int main() {
  cin>>n>>m;
  fore(i,0,n){
    cin>>c;fore(j,0,c){
      cin>>a;v[i].pb(a-1);
    }
    if(!c)r.pb(i);
  }cin>>s;
  if(!r.size()){cout<<"Draw"<<endl;return 0;}
  dfs(s-1,0);
  if(!l)cout<<"Lose"<<endl;
  else if(l==2)cout<<"Draw"<<endl;
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define fore(i, s, e) for(int i = s; i < e; i++)
#define pb push_back

const int N = 1e5 + 100;

vector<int> g[N];
vector<int> ng[N];
int qty[N];

stack<int> st, res;

set<int> check;

bool visited[N][2];

int nvar;int neg(int x){return N-1-x;} // (2SAT)

int n, m, lw[N], idx[N], qidx, cmp[N], qcmp;

void tjn(int u){
	lw[u]=idx[u]=++qidx;
	st.push(u);cmp[u]=-2;
	for(int v:g[u]){
		if(!idx[v]||cmp[v]==-2){
			if(!idx[v]) tjn(v);
			lw[u]=min(lw[u],lw[v]);
		}
	}
	if(lw[u]==idx[u]){
		int x,l=-1;
		do{x=st.top();st.pop();cmp[x]=qcmp;if(min(x,neg(x))<nvar)l=x;}
		while(x!=u);
		qcmp++;
	}
}
void scc(){
	memset(idx,0,sizeof(idx));qidx=0;
	memset(cmp,-1,sizeof(cmp));qcmp=0;
	fore(i,0,n)if(!idx[i])tjn(i);
}

void dfs(int x, int p = 0) {
    visited[x][p] = 1; st.push(x);
    if(check.count(x) && p) res = st;
    for(auto y: g[x]) if(!visited[y][(p + 1) % 2]) {
        dfs(y, (p + 1) % 2);
        st.pop();
    }
}

bool f = false;

bool visited2[N];

void dfs2(int x) {
    visited2[x] = 1;
    f = f || qty[x] > 1;
    for(auto y : ng[x]) if(!visited2[y]) {
        dfs2(y);
    }
}

int main() {

    cin >> n >> m;

    fore(i, 0, n) {
        int c; cin >> c;
        fore(j, 0, c) {
            int x; cin >> x;
            g[i].pb(x - 1);
        }
    }

    fore(i, 0, n) if(g[i].size() == 0) check.insert(i);

    int s; cin >> s;

    dfs(s - 1);

    vector<int> r;

    while(res.size()) r.pb(res.top()), res.pop();
    reverse(r.begin(), r.end());

    if(r.size()) {
        cout << "Win ";
        fore(i, 0, r.size())
            cout << r[i] + 1 << " \n"[i == r.size() - 1];
        return 0;
    }

    scc();

    fore(i, 0, n) {
        qty[cmp[i]]++;
        for(auto y : g[i]) ng[cmp[i]].pb(cmp[y]);
    }

    dfs2(cmp[s - 1]);

    if(f) cout << "Draw" << endl;
    else cout << "Lose" << endl;

    return 0;
}

/*
57 39
1 57
1 40
1 38
0
0
0
1 20
0
0
1 53
0
0
0
1 36
1 40
1 27
1 11
1 7
1 35
0
1 23
1 44
1 14
1 54
0
1 21
1 28
1 37
1 38
1 26
1 3
0
1 14
0
1 1
1 10
1 52
1 45
0
1 16
0
1 22
1 51
1 48
1 30
1 30
0
1 19
1 33
0
1 45
1 42
1 49
0
1 23
0
1 31
15
*/


#include <bits/stdc++.h>

using namespace std;

#define fore(i, s, e) for(int i = s; i < e; i++)
#define pb push_back

const int N = 1e5 + 100;

vector<int> g[N];
vector<int> ng[N];
int qty[N];

stack<int> st, res;

set<int> check;

bool visited[N][2];

int nvar;int neg(int x){return N-1-x;} // (2SAT)

int n, m, lw[N], idx[N], qidx, cmp[N], qcmp;

void tjn(int u){
	lw[u]=idx[u]=++qidx;
	st.push(u);cmp[u]=-2;
	for(int v:g[u]){
		if(!idx[v]||cmp[v]==-2){
			if(!idx[v]) tjn(v);
			lw[u]=min(lw[u],lw[v]);
		}
	}
	if(lw[u]==idx[u]){
		int x,l=-1;
		do{x=st.top();st.pop();cmp[x]=qcmp;if(min(x,neg(x))<nvar)l=x;}
		while(x!=u);
		qcmp++;
	}
}
void scc(){
	memset(idx,0,sizeof(idx));qidx=0;
	memset(cmp,-1,sizeof(cmp));qcmp=0;
	fore(i,0,n)if(!idx[i])tjn(i);
}

void dfs(int x, int p = 0) {
    visited[x][p] = 1; st.push(x);
    if(check.count(x) && p) res = st;
    for(auto y: g[x]) if(!visited[y][(p + 1) % 2]) {
        dfs(y, (p + 1) % 2);
        st.pop();
    }
}

bool f = false;

bool visited2[N];

void dfs2(int x) {
    visited2[x] = 1;
    f = f || qty[x] > 1;
    for(auto y : ng[x]) if(!visited2[y]) {
        dfs(y);
    }
}

int main() {

    cin >> n >> m;

    fore(i, 0, n) {
        int c; cin >> c;
        fore(j, 0, c) {
            int x; cin >> x;
            g[i].pb(x - 1);
        }
    }

    fore(i, 0, n) if(g[i].size() == 0) check.insert(i);

    int s; cin >> s;

    dfs(s - 1);

    vector<int> r;

    while(res.size()) r.pb(res.top()), res.pop();
    reverse(r.begin(), r.end());

    if(r.size()) {
        cout << "Win ";
        fore(i, 0, r.size())
            cout << r[i] + 1 << " \n"[i == r.size() - 1];
        return 0;
    }

    scc();

    fore(i, 0, n) {
        qty[cmp[i]]++;
        for(auto y : g[i]) ng[cmp[i]].pb(cmp[y]);
    }

    dfs2(cmp[s - 1]);

    if(f) cout << "Draw" << endl;
    else cout << "Lose" << endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fore(i,s,e) for(int i=s;i<e;i++)
#define pb push_back
vector<int>v[1000001],st,r;
int n,m,a,b,c,s,l; // L=0->Loose,L=1->Win,L=2->Draw
void dfs(int x,int steps){
  st.pb(x);
  for(int i=0;i<v[x].size()&&l!=1;i++){
    fore(i,0,r.size()){
      if(v[x][i]==r[i]){
        if(!(steps%2)){
          st.pb(v[x][i]);cout<<"Win"<<endl;
          fore(i,0,st.size())cout<<st[i]+1<<" ";
          l=1;return;
        } else {
          l=0;
        }
      }
    }
    dfs(v[x][i],steps+1);
    st.pop_back();
  }
}
int main() {
  cin>>n>>m;
  fore(i,0,n){
    cin>>c;fore(j,0,c){
      cin>>a;v[i].pb(a-1);
    }
    if(!c)r.pb(i);
  }cin>>s;
  if(!r.size()){cout<<"Draw"<<endl;return 0;}
  dfs(s-1,0);
  if(!l)cout<<"Lose"<<endl;
  else if(l==2)cout<<"Draw"<<endl;
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fore(i,s,e) for(int i=s;i<e;i++)
#define pb push_back
vector<int>v[100001],st,r;
bool visited[100001];
int n,m,a,b,c,s,l; // L=0->Loose,L=1->Win,L=2->Draw
void dfs(int x,int steps){
  if(!visited[x]) {
    visited[x]=true;st.pb(x);
    for(int i=0;i<v[x].size()&&l!=1;i++){
      fore(k,0,r.size()){
        if(v[x][i]==r[k]){
          if(!(steps%2)){
            st.pb(v[x][i]);cout<<"Win"<<endl;
            fore(i,0,st.size())cout<<st[i]+1<<" ";
            l=1;return;
          } else {
            l=0;
          }
        }
      }
      dfs(v[x][i],steps+1);
      st.pop_back();
    }
  }
}
int main() {
  cin>>n>>m;
  fore(i,0,n){
    cin>>c;fore(j,0,c){
      cin>>a;v[i].pb(a-1);
    }
    if(!c)r.pb(i);
  }cin>>s;
  if(!r.size()){cout<<"Draw"<<endl;return 0;}
  dfs(s-1,0);
  if(!l)cout<<"Lose"<<endl;
  else if(l==2)cout<<"Draw"<<endl;
  return 0;
}


/* Author haleyk10198 */
/* �@��:  haleyk10198 */
/* CF handle: haleyk100198*/
/* FOR ACM-ICPC WF*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")

using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;

#define pb push_back

constexpr auto MOD = 1000000007LL;
constexpr auto LINF = (1LL<<60);
constexpr auto INF = 2147483647LL;
constexpr auto PI = 3.1415926535897932384626433;
constexpr auto EPS = 1E-9;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2> p){
	out << p.first << ' ' << p.second;
	return out;
}

template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2> p){
	in >> p.first >> p.second;
	return in;
}

auto printVector = []<typename T>(ostream& out, vector<T> v){
	copy(v.begin(), v.end(), ostream_iterator<T>(out, " "));
};

#define MAXN 200010
#define MAXM 200010

int n, m, vis[MAXN][2], out[MAXN], nxt[MAXN][2];
vi e[MAXN], be[MAXN];

int inStack[MAXN];
bool dfs(int now){
	inStack[now] = 1;
	bool ret = false;
	for(auto x: e[now])
		if(inStack[x] == 2);
		else if(inStack[x] == 1) return true;
		else ret |= dfs(x);
	inStack[now] = 2;
	return ret;
}

int main(){
	#ifdef LOCAL
		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	#endif
	ios_base::sync_with_stdio(false);

	cin >> n >> m;
	for(int i = 1, k; i <= n; i++){
		cin >> k; e[i].resize(k);
		for(int j = 0; j < k; j++){
			cin >> e[i][j];
			be[e[i][j]].push_back(i);
		}
	}

	queue<pii> q;
	for(int i = 1; i <= n; i++)
		if(e[i].empty())
			q.push(pair(i, 0));

	while(!q.empty()){
		auto [pos, st] = q.front();

		q.pop();
		vis[pos][st] = 1;

		for(auto prv: be[pos]){
			if(st == 0){
				if(not vis[prv][1]){
					q.push(pair(prv, 1));
					nxt[prv][1] = pos;
				}
				vis[prv][1] = 1;
			}
			else{
				if(not vis[prv][0]){
					q.push(pair(prv, 0));
					nxt[prv][0] = pos;
				}
				vis[prv][0] = 1;
			}
		}
	}

	int S; cin >> S;

	if(vis[S][1]){
		cout << "Win" << endl;
		for(int pos = S, tn = 1; pos; pos = nxt[pos][tn], tn^=1)
			cout << pos << (nxt[pos][tn]? ' ': '\n');
		return 0;
	}
	else if(dfs(S)) cout << "Draw" << endl;
	else cout << "Lose" << endl; //clap clap clap clap clap clap clap clap

	return 0;
}


/* Author haleyk10198 */
/* �@��:  haleyk10198 */
/* CF handle: haleyk100198*/
/* FOR ACM-ICPC WF*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")

using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;

#define pb push_back

constexpr auto MOD = 1000000007LL;
constexpr auto LINF = (1LL<<60);
constexpr auto INF = 2147483647LL;
constexpr auto PI = 3.1415926535897932384626433;
constexpr auto EPS = 1E-9;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2> p){
	out << p.first << ' ' << p.second;
	return out;
}

template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2> p){
	in >> p.first >> p.second;
	return in;
}

auto printVector = []<typename T>(ostream& out, vector<T> v){
	copy(v.begin(), v.end(), ostream_iterator<T>(out, " "));
};

#define MAXN 200010
#define MAXM 200010

int n, m, vis[MAXN][2], out[MAXN], nxt[MAXN][2];
vi e[MAXN], be[MAXN];

int main(){
	#ifdef LOCAL
		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	#endif
	ios_base::sync_with_stdio(false);

	cin >> n >> m;
	for(int i = 1, k; i <= n; i++){
		cin >> k; e[i].resize(k);
		for(int j = 0; j < k; j++){
			cin >> e[i][j];
			be[e[i][j]].push_back(i);
		}
	}

	queue<pii> q;
	for(int i = 1; i <= n; i++)
		if(e[i].empty())
			q.push(pair(i, 0));

	while(!q.empty()){
		auto [pos, st] = q.front();

		q.pop();
		if(vis[pos][st]) continue;
		vis[pos][st] = 1;

		for(auto prv: be[pos]){
			if(st == 0){
				q.push(pair(prv, 1));
				nxt[prv][1] = pos;
			}
			else{
				q.push(pair(prv, 0));
				nxt[prv][0] = pos;
			}
		}
	}

	int S; cin >> S;

	if(vis[S][1]){
		cout << "Win" << endl;
		for(int pos = S, tn = 1; pos; pos = nxt[pos][tn], tn^=1)
			cout << pos << (nxt[pos][tn]? ' ': '\n');
		return 0;
	}

	memset(vis, 0, sizeof(vis));
	memset(nxt, 0, sizeof(nxt));

	for(int i = 1; i <= n; i++)
		if(e[i].empty())
			q.push(pair(i, 0));

	while(!q.empty()){
		auto [pos, st] = q.front();

		q.pop();
		if(vis[pos][st]) continue;
		vis[pos][st] = 1;

		for(auto prv: be[pos]){
			if(st == 0){
				q.push(pair(prv, 1));
			}
			else{
				if(++out[prv] == (int) e[prv].size())
					q.push(pair(prv, 0));
			}
		}
	}

	if(vis[S][0]) cout << "Lose" << endl;
	else cout << "Win" << endl;

	return 0;
}


/* Author haleyk10198 */
/* �@��:  haleyk10198 */
/* CF handle: haleyk100198*/
/* FOR ACM-ICPC WF*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")

using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;

#define pb push_back

constexpr auto MOD = 1000000007LL;
constexpr auto LINF = (1LL<<60);
constexpr auto INF = 2147483647LL;
constexpr auto PI = 3.1415926535897932384626433;
constexpr auto EPS = 1E-9;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2> p){
	out << p.first << ' ' << p.second;
	return out;
}

template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2> p){
	in >> p.first >> p.second;
	return in;
}

auto printVector = []<typename T>(ostream& out, vector<T> v){
	copy(v.begin(), v.end(), ostream_iterator<T>(out, " "));
};

#define MAXN 200010
#define MAXM 200010

int n, m, vis[MAXN][2], out[MAXN], nxt[MAXN][2];
vi e[MAXN], be[MAXN];

int main(){
	#ifdef LOCAL
		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	#endif
	ios_base::sync_with_stdio(false);

	cin >> n >> m;
	for(int i = 1, k; i <= n; i++){
		cin >> k; e[i].resize(k);
		for(int j = 0; j < k; j++){
			cin >> e[i][j];
			be[e[i][j]].push_back(i);
		}
	}

	queue<pii> q;
	for(int i = 1; i <= n; i++)
		if(e[i].empty())
			q.push(pair(i, 0));

	while(!q.empty()){
		auto [pos, st] = q.front();

		q.pop();
		if(vis[pos][st]) continue;
		vis[pos][st] = 1;

		for(auto prv: be[pos]){
			if(st == 0){
				q.push(pair(prv, 1));
				nxt[prv][1] = pos;
			}
			else{
				q.push(pair(prv, 0));
				nxt[prv][0] = pos;
			}
		}
	}

	int S; cin >> S;

	if(vis[S][1]){
		cout << "Win" << endl;
		for(int pos = S, tn = 1; pos; pos = nxt[pos][tn], tn^=1)
			cout << pos << (nxt[pos][tn]? ' ': '\n');
		return 0;
	}

	memset(vis, 0, sizeof(vis));
	memset(nxt, 0, sizeof(nxt));

	for(int i = 1; i <= n; i++)
		if(e[i].empty())
			q.push(pair(i, 0));

	while(!q.empty()){
		auto [pos, st] = q.front();

		q.pop();
		if(vis[pos][st]) continue;
		vis[pos][st] = 1;

		for(auto prv: be[pos]){
			if(st == 0){
				q.push(pair(prv, 1));
			}
			else{
				if(++out[prv] == (int) e[prv].size())
					q.push(pair(prv, 0));
			}
		}
	}

	if(vis[S][0]) cout << "Lose" << endl;
	else cout << "Draw" << endl; //clap clap clap clap clap clap clap clap

	return 0;
}


/* Author haleyk10198 */
/* �@��:  haleyk10198 */
/* CF handle: haleyk100198*/
/* FOR ACM-ICPC WF*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")

using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;

#define pb push_back

constexpr auto MOD = 1000000007LL;
constexpr auto LINF = (1LL<<60);
constexpr auto INF = 2147483647LL;
constexpr auto PI = 3.1415926535897932384626433;
constexpr auto EPS = 1E-9;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2> p){
	out << p.first << ' ' << p.second;
	return out;
}

template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2> p){
	in >> p.first >> p.second;
	return in;
}

auto printVector = []<typename T>(ostream& out, vector<T> v){
	copy(v.begin(), v.end(), ostream_iterator<T>(out, " "));
};

#define MAXN 200010
#define MAXM 200010

int n, m, vis[MAXN][2], out[MAXN], nxt[MAXN][2];
vi e[MAXN], be[MAXN];

int main(){
	#ifdef LOCAL
		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	#endif
	ios_base::sync_with_stdio(false);

	cin >> n >> m;
	for(int i = 1, k; i <= n; i++){
		cin >> k; e[i].resize(k);
		for(int j = 0; j < k; j++){
			cin >> e[i][j];
			be[e[i][j]].push_back(i);
		}
	}

	queue<pii> q;
	for(int i = 1; i <= n; i++)
		if(e[i].empty())
			q.push(pair(i, 0));

	while(!q.empty()){
		auto [pos, st] = q.front();

		q.pop();
		vis[pos][st] = 1;

		for(auto prv: be[pos]){
			if(st == 0){
				if(not vis[prv][1]){
					q.push(pair(prv, 1));
					nxt[prv][1] = pos;
				}
				vis[prv][1] = 1;
			}
			else{
				if(not vis[prv][0]){
					q.push(pair(prv, 0));
					nxt[prv][0] = pos;
				}
				vis[prv][0] = 1;
			}
		}
	}

	int S; cin >> S;

	if(vis[S][1]){
		cout << "Win" << endl;
		for(int pos = S, tn = 1; pos; pos = nxt[pos][tn], tn^=1)
			cout << pos << (nxt[pos][tn]? ' ': '\n');
		return 0;
	}

	memset(vis, 0, sizeof(vis));
	memset(nxt, 0, sizeof(nxt));

	for(int i = 1; i <= n; i++)
		if(e[i].empty())
			q.push(pair(i, 0));

	while(!q.empty()){
		auto [pos, st] = q.front();

		q.pop();
		vis[pos][st] = 1;

		for(auto prv: be[pos]){
			if(st == 0){
				if(not vis[prv][1]){
					q.push(pair(prv, 1));
					vis[prv][1] = 1;
				}
			}
			else{
				if(++out[prv] == (int) e[prv].size())
					if(not vis[prv][0]){
						q.push(pair(prv, 0));
						vis[prv][0] = 1;
					}
			}
		}
	}

	if(vis[S][0]) cout << "Lose" << endl;
	else cout << "Draw" << endl; //clap clap clap clap clap clap clap clap

	return 0;
}


/* Author haleyk10198 */
/* �@��:  haleyk10198 */
/* CF handle: haleyk100198*/
/* FOR ACM-ICPC WF*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")

using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;

#define pb push_back

constexpr auto MOD = 1000000007LL;
constexpr auto LINF = (1LL<<60);
constexpr auto INF = 2147483647LL;
constexpr auto PI = 3.1415926535897932384626433;
constexpr auto EPS = 1E-9;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2> p){
	out << p.first << ' ' << p.second;
	return out;
}

template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2> p){
	in >> p.first >> p.second;
	return in;
}

auto printVector = []<typename T>(ostream& out, vector<T> v){
	copy(v.begin(), v.end(), ostream_iterator<T>(out, " "));
};

#define MAXN 200010
#define MAXM 200010

int n, m, vis[MAXN][2], out[MAXN], nxt[MAXN];
vi e[MAXN], be[MAXN];

int main(){
	#ifdef LOCAL
		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	#endif
	ios_base::sync_with_stdio(false);

	cin >> n >> m;
	for(int i = 1, k; i <= n; i++){
		cin >> k; e[i].resize(k);
		for(int j = 0; j < k; j++){
			cin >> e[i][j];
			be[e[i][j]].push_back(i);
		}
	}

	queue<pii> q;
	for(int i = 1; i <= n; i++)
		if(e[i].empty())
			q.push(pair(i, 0));

	while(!q.empty()){
		auto [pos, st] = q.front();

		q.pop();
		if(vis[pos][st]) continue;
		vis[pos][st] = 1;

		for(auto prv: be[pos]){
			if(st == 0){
				q.push(pair(prv, 1));
				nxt[prv] = pos;
			}
			else{
				if(++out[prv] == (int) e[prv].size()){
					q.push(pair(prv, 0));
					nxt[prv] = pos;
				}
			}
		}
	}

	int S; cin >> S;
	assert(not (vis[S][0] && vis[S][1]));

	if(vis[S][0]) cout << "Lose" << endl;
	else if(vis[S][1]){
		cout << "Win" << endl;
		for(int pos = S; pos; pos = nxt[pos])
			cout << pos << (nxt[pos]? ' ': '\n');

	}
	else cout << "Draw" << endl;

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stdio.h>
#include <set>
#include <string>
#include <vector>
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <map>
#include <iomanip>
#include <functional>
#include <queue>
#include <stdlib.h>

using namespace std;

const double eps = 1e-9;
const long long mod = 1e9 + 7;

#define pb push_back
#define F first
#define S second

typedef long long ll;

void solve();

signed main() {
	srand('V' + 'a' + 'n' + 'k' + 'a' + 'T' + 'a' + 'g' + 'a' + 'n' + 'a' + 'i');
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	solve();

	return 0;
}

vector<vector<int>> g;
vector<bool> used;
bool flag = false;

void dfs(int v) {
    used[v] = true;;
    for (int i = 0; i < g[v].size(); i++) {
        int to = g[v][i];
        if (used[to]) {
            flag = true;
        }
        else {
            dfs(to);
        }
    }
    return;
}

void solve() {
    int n, m;
    cin >> n >> m;
    g.assign(n + 1, vector<int>());
    used.assign(n + 1, false);
    for (int i = 1 ; i <= n; i++) {
        int c;
        cin >> c;
        for (int j = 0; j < c; j++) {
            int x;
            cin >> x;
            g[i].push_back(x);
        }
    }

    int s;
    cin >> s;

    dfs(s);

    vector<vector<bool>> u(n + 1, vector<bool>(2, false));
    vector<vector<pair<int, int>>> par(n + 1, vector<pair<int, int>>(2, {-1, -1}));

    queue<pair<int, int>> q;
    q.emplace(s, 0);
    u[s][0] = true;
    while (q.size() > 0) {
        pair<int, int> p = q.front();
        q.pop();
        int v = p.F;
        for (int i = 0; i < g[v].size(); i++) {
            int to = g[v][i];
            if (!u[to][(p.S + 1) % 2]) {
                u[to][(p.S + 1) % 2] = true;
                q.emplace(to, (p.S + 1) % 2);
                par[to][(p.S + 1) % 2] = {v, p.S};
            }
        }
    }

    bool w = false;

    vector<int> ans;
    for (int i = 1; i <= n; i++) {
        if (g[i].size() == 0 && u[i][1]) {
            w = true;
            int v = i, u = 1;
            while (v != -1) {
                ans.push_back(v);
                int h = par[v][u].F;
                u = par[v][u].S;
                v = h;
            }
        }
    }

    reverse(ans.begin(), ans.end());

    if (w) {
        cout << "Win\n";
        for (int i = 0; i < ans.size(); i++) {
            cout << ans[i] << " ";
        }
    }
    else if (flag) {
        cout << "Draw";
    }
    else {
        cout << "Lose";
    }

	return;
}


#define _CRT_secondECURE_NO_WARNINGsecond
#include <iostream>
#include <stdio.h>
#include <set>
#include <string>
#include <vector>
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <map>
#include <iomanip>
#include <functional>
#include <queue>
#include <stdlib.h>

using namespace std;

const double eps = 1e-9;
const long long mod = 1e9 + 7;

#define pb push_back

typedef long long ll;

void solve();

signed main() {
	srand('V' + 'a' + 'n' + 'k' + 'a' + 'T' + 'a' + 'g' + 'a' + 'n' + 'a' + 'i');
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	solve();

	return 0;
}

vector<vector<int>> g;
vector<int> used;
bool flag = false;

void dfs(int v) {
    used[v] = 1;
    for (int i = 0; i < g[v].size(); i++) {
        int to = g[v][i];
        if (used[to] == 1) {
            flag = true;
        }
        else if (used[to] == 0) {
            dfs(to);
        }
    }
    used[v] = 2;
    return;
}

void solve() {
    int n, m;
    cin >> n >> m;
    g.assign(n + 1, vector<int>());
    used.assign(n + 1, 0);
    for (int i = 1 ; i <= n; i++) {
        int c;
        cin >> c;
        for (int j = 0; j < c; j++) {
            int x;
            cin >> x;
            g[i].push_back(x);
        }
    }

    int s;
    cin >> s;

    dfs(s);

    vector<vector<bool>> u(n + 1, vector<bool>(2, false));
    vector<vector<pair<int, int>>> par(n + 1, vector<pair<int, int>>(2, {-1, -1}));

    queue<pair<int, int>> q;
    q.emplace(s, 0);
    u[s][0] = true;
    while (q.size() > 0) {
        pair<int, int> p = q.front();
        q.pop();
        int v = p.first;
        for (int i = 0; i < g[v].size(); i++) {
            int to = g[v][i];
            if (!u[to][(p.second + 1) % 2]) {
                u[to][(p.second + 1) % 2] = true;
                q.emplace(to, (p.second + 1) % 2);
                par[to][(p.second + 1) % 2] = {v, p.second};
            }
        }
    }

    bool w = false;

    vector<int> ans;
    for (int i = n; i >= 1; i--) {
        if (g[i].size() == 0 && u[i][1]) {
            w = true;
            int v = i, us = 1;
            while (v != -1) {
                ans.push_back(v);
                int h = par[v][us].first;
                us = par[v][us].second;
                v = h;
            }
            break;
        }
    }

    reverse(ans.begin(), ans.end());

    if (w) {
        cout << "Win\n";
        for (int i = 0; i < ans.size(); i++) {
            cout << ans[i] << " ";
        }
    }
    else if (flag) {
        cout << "Draw";
    }
    else {
        cout << "Lose";
    }

	return;
}


#define _CRT_secondECURE_NO_WARNINGsecond
#include <iostream>
#include <stdio.h>
#include <set>
#include <string>
#include <vector>
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <map>
#include <iomanip>
#include <functional>
#include <queue>
#include <stdlib.h>

using namespace std;

const double eps = 1e-9;
const long long mod = 1e9 + 7;

#define pb push_back

typedef long long ll;

void solve();

signed main() {
	srand('V' + 'a' + 'n' + 'k' + 'a' + 'T' + 'a' + 'g' + 'a' + 'n' + 'a' + 'i');
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	solve();

	return 0;
}

vector<vector<int>> g;
vector<int> used;
bool flag = false;

void dfs(int v) {
    used[v] = 1;
    for (int i = 0; i < g[v].size(); i++) {
        int to = g[v][i];
        if (used[to] == 1) {
            flag = true;
        }
        else {
            dfs(to);
        }
    }
    used[v] = 2;
    return;
}

void solve() {
    int n, m;
    cin >> n >> m;
    g.assign(n + 1, vector<int>());
    used.assign(n + 1, 0);
    for (int i = 1 ; i <= n; i++) {
        int c;
        cin >> c;
        for (int j = 0; j < c; j++) {
            int x;
            cin >> x;
            g[i].push_back(x);
        }
    }

    int s;
    cin >> s;

    dfs(s);

    vector<vector<bool>> u(n + 1, vector<bool>(2, false));
    vector<vector<pair<int, int>>> par(n + 1, vector<pair<int, int>>(2, {-1, -1}));

    queue<pair<int, int>> q;
    q.emplace(s, 0);
    u[s][0] = true;
    while (q.size() > 0) {
        pair<int, int> p = q.front();
        q.pop();
        int v = p.first;
        for (int i = 0; i < g[v].size(); i++) {
            int to = g[v][i];
            if (!u[to][(p.second + 1) % 2]) {
                u[to][(p.second + 1) % 2] = true;
                q.emplace(to, (p.second + 1) % 2);
                par[to][(p.second + 1) % 2] = {v, p.second};
            }
        }
    }

    bool w = false;

    vector<int> ans;
    for (int i = n; i >= 1; i--) {
        if (g[i].size() == 0 && u[i][1]) {
            w = true;
            int v = i, us = 1;
            while (v != -1) {
                ans.push_back(v);
                int h = par[v][us].first;
                us = par[v][us].second;
                v = h;
            }
            break;
        }
    }

    reverse(ans.begin(), ans.end());

    if (w) {
        cout << "Win\n";
        for (int i = 0; i < ans.size(); i++) {
            cout << ans[i] << " ";
        }
    }
    else if (flag) {
        cout << "Draw";
    }
    else {
        cout << "Lose";
    }

	return;
}


#define _CRT_secondECURE_NO_WARNINGsecond
#include <iostream>
#include <stdio.h>
#include <set>
#include <string>
#include <vector>
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <map>
#include <iomanip>
#include <functional>
#include <queue>
#include <stdlib.h>

using namespace std;

const double eps = 1e-9;
const long long mod = 1e9 + 7;

#define pb push_back

typedef long long ll;

void solve();

signed main() {
	srand('V' + 'a' + 'n' + 'k' + 'a' + 'T' + 'a' + 'g' + 'a' + 'n' + 'a' + 'i');
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	solve();

	return 0;
}

vector<vector<int>> g;
vector<bool> used;
bool flag = false;

void dfs(int v) {
    used[v] = true;;
    for (int i = 0; i < g[v].size(); i++) {
        int to = g[v][i];
        if (used[to]) {
            flag = true;
        }
        else {
            dfs(to);
        }
    }
    return;
}

void solve() {
    int n, m;
    cin >> n >> m;
    g.assign(n + 1, vector<int>());
    used.assign(n + 1, false);
    for (int i = 1 ; i <= n; i++) {
        int c;
        cin >> c;
        for (int j = 0; j < c; j++) {
            int x;
            cin >> x;
            g[i].push_back(x);
        }
    }

    int s;
    cin >> s;

    dfs(s);

    vector<vector<bool>> u(n + 1, vector<bool>(2, false));
    vector<vector<pair<int, int>>> par(n + 1, vector<pair<int, int>>(2, {-1, -1}));

    queue<pair<int, int>> q;
    q.emplace(s, 0);
    u[s][0] = true;
    while (q.size() > 0) {
        pair<int, int> p = q.front();
        q.pop();
        int v = p.first;
        for (int i = 0; i < g[v].size(); i++) {
            int to = g[v][i];
            if (!u[to][(p.second + 1) % 2]) {
                u[to][(p.second + 1) % 2] = true;
                q.emplace(to, (p.second + 1) % 2);
                par[to][(p.second + 1) % 2] = {v, p.second};
            }
        }
    }

    bool w = false;

    vector<int> ans;
    for (int i = n; i >= 1; i--) {
        if (g[i].size() == 0 && u[i][1]) {
            w = true;
            int v = i, us = 1;
            while (v != -1) {
                ans.push_back(v);
                int h = par[v][us].first;
                us = par[v][us].second;
                v = h;
            }
        }
    }

    reverse(ans.begin(), ans.end());

    if (w) {
        cout << "Win\n";
        for (int i = 0; i < ans.size(); i++) {
            cout << ans[i] << " ";
        }
    }
    else if (flag) {
        cout << "Draw";
    }
    else {
        cout << "Lose";
    }

	return;
}


#define _CRT_secondECURE_NO_WARNINGsecond
#include <iostream>
#include <stdio.h>
#include <set>
#include <string>
#include <vector>
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <map>
#include <iomanip>
#include <functional>
#include <queue>
#include <stdlib.h>

using namespace std;

const double eps = 1e-9;
const long long mod = 1e9 + 7;

#define pb push_back

typedef long long ll;

void solve();

signed main() {
	srand('V' + 'a' + 'n' + 'k' + 'a' + 'T' + 'a' + 'g' + 'a' + 'n' + 'a' + 'i');
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	solve();

	return 0;
}

vector<vector<int>> g;
vector<bool> used;
bool flag = false;

void dfs(int v) {
    used[v] = true;;
    for (int i = 0; i < g[v].size(); i++) {
        int to = g[v][i];
        if (used[to]) {
            flag = true;
        }
        else {
            dfs(to);
        }
    }
    return;
}

void solve() {
    int n, m;
    cin >> n >> m;
    g.assign(n + 1, vector<int>());
    used.assign(n + 1, false);
    for (int i = 1 ; i <= n; i++) {
        int c;
        cin >> c;
        for (int j = 0; j < c; j++) {
            int x;
            cin >> x;
            g[i].push_back(x);
        }
    }

    int s;
    cin >> s;

    dfs(s);

    vector<vector<bool>> u(n + 1, vector<bool>(2, false));
    vector<vector<pair<int, int>>> par(n + 1, vector<pair<int, int>>(2, {-1, -1}));

    queue<pair<int, int>> q;
    q.emplace(s, 0);
    u[s][0] = true;
    while (q.size() > 0) {
        pair<int, int> p = q.front();
        q.pop();
        int v = p.first;
        for (int i = 0; i < g[v].size(); i++) {
            int to = g[v][i];
            if (!u[to][(p.second + 1) % 2]) {
                u[to][(p.second + 1) % 2] = true;
                q.emplace(to, (p.second + 1) % 2);
                par[to][(p.second + 1) % 2] = {v, p.second};
            }
        }
    }

    bool w = false;

    vector<int> ans;
    for (int i = n; i >= 1; i--) {
        if (g[i].size() == 0 && u[i][1]) {
            w = true;
            int v = i, us = 1;
            while (v != -1) {
                ans.push_back(v);
                int h = par[v][us].first;
                us = par[v][us].second;
                v = h;
            }
            break;
        }
    }

    reverse(ans.begin(), ans.end());

    if (w) {
        cout << "Win\n";
        for (int i = 0; i < ans.size(); i++) {
            cout << ans[i] << " ";
        }
    }
    else if (flag) {
        cout << "Draw";
    }
    else {
        cout << "Lose";
    }

	return;
}


#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <stack>

using namespace std;
typedef long long ll;

vector<int> a[100001];
int ind[100001];
int d[100001][2];
int how[100001][2];
int low[100001], dfsn[100001];
bool finished[100001];
stack<int> st;
int cnt = 1;
bool Cycle = false;

void scc(int x) {
	st.push(x);
	dfsn[x] = cnt;
	low[x] = cnt++;

	for (int next : a[x]) {
		if (dfsn[next] == 0) {
			scc(next);
			low[x] = min(low[x], low[next]);
		}
		else {
			if (!finished[next]) {
				low[x] = min(low[x], dfsn[next]);
			}
		}
	}
	if (low[x] == dfsn[x]) {
		int sum = 0;
		while (1) {
			int nx = st.top(); st.pop();
			sum += 1;
			finished[nx] = true;
			if (nx == x)break;
		}
		if (sum > 1)Cycle = true;
	}
}

int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

	int n, m; cin >> n >> m;
	for (int i = 1; i <= n; i++) {
		int c; cin >> c;
		while (c--) {
			int x; cin >> x;
			a[i].push_back(x);
			ind[i] += 1;
		}
	}

	int s; cin >> s;
	queue<pair<int,int>> q;
	memset(d, -1, sizeof(d));

	d[s][0] = 1;
	q.push({ s, 0 });
	while (!q.empty()) {
		int x = q.front().first;
		int y = q.front().second; q.pop();
		for (int next : a[x]) {
			int nz = (y + 1) % 2;
			if (d[next][nz] == -1) {
				d[next][nz] = 1;
				how[next][nz] = x;
				q.push({ next, nz });
			}
		}
	}

	for (int i = 1; i <= n; i++) {
		if (ind[i] == 0) {
			if (d[i][1] == 1) {
				cout << "Win" << '\n';
				int t = 1;
				for (int j = i; j != 0; j = how[j][t], t = 1 - t) {
					st.push(j);

				}
				while (!st.empty()) {
					cout << st.top() << ' '; st.pop();
				}cout << '\n';
				return 0;
			}
		}
	}

	scc(s);

	if (Cycle) {
		cout << "Draw" << '\n';
	}
	else cout << "Lose" << '\n';

}


#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <stack>

using namespace std;
typedef long long ll;

vector<int> a[100001];
int ind[100001];
int d[100001][2];
int how[100001][2];
int low[100001], dfsn[100001];
bool finished[100001];
stack<int> st;
int cnt = 1;
bool Cycle = false;

void scc(int x) {
	st.push(x);
	dfsn[x] = cnt;
	low[x] = cnt++;

	for (int next : a[x]) {
		if (dfsn[next] == 0) {
			scc(next);
			low[x] = min(low[x], low[next]);
		}
		else {
			if (!finished[next]) {
				low[x] = min(low[x], dfsn[next]);
			}
		}
	}
	if (low[x] == dfsn[x]) {
		int sum = 0;
		while (1) {
			int nx = st.top(); st.pop();
			sum += 1;

			if (nx == x)break;
		}
		if (sum > 1)Cycle = true;
	}
}

int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

	int n, m; cin >> n >> m;
	for (int i = 1; i <= n; i++) {
		int c; cin >> c;
		while (c--) {
			int x; cin >> x;
			a[i].push_back(x);
			ind[i] += 1;
		}
	}

	int s; cin >> s;
	queue<pair<int,int>> q;
	memset(d, -1, sizeof(d));

	d[s][0] = 1;
	q.push({ s, 0 });
	while (!q.empty()) {
		int x = q.front().first;
		int y = q.front().second; q.pop();
		for (int next : a[x]) {
			int nz = (y + 1) % 2;
			if (d[next][nz] == -1) {
				d[next][nz] = 1;
				how[next][nz] = x;
				q.push({ next, nz });
			}
		}
	}

	for (int i = 1; i <= n; i++) {
		if (ind[i] == 0) {
			if (d[i][1] == 1) {
				cout << "Win" << '\n';
				int t = 1;
				for (int j = i; j != 0; j = how[j][t], t = 1 - t) {
					cout << j << ' ';

				}cout << '\n';
				return 0;
			}
		}
	}

	scc(s);

	if (Cycle) {
		cout << "Draw" << '\n';
	}
	else cout << "Lose" << '\n';

}


#include <bits/stdc++.h>
using namespace std;
#define int long long

const int N = 1e5+10;

vector<vector<pair<int, int>>> adj;
vector<vector<int>> g;
vector<int> p;

bool vis[2*N];
bool rec[2*N];
bool exs;

void dfs(int node){
	vis[node]=true;
	rec[node]=true;
	for(auto i:adj[node]){
		if(rec[i.first]==true){
			exs=true;
			break;
		}
		if(!vis[i.first]){
			dfs(i.first);
		}
	}
	rec[node]=false;
	return;
}

int ind(int i,int par){
	return 2*i+1+par;
}

void calc(int node,int par){
	vis[node]=1;
	p[node] = par;
	for(auto i:g[node]){
		if(!vis[i]){
			p[i]=node;
			calc(i,node);
		}
	}
	return;
}

int32_t main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
   	int n,m,st;
   	cin>>n>>m;
   	adj.resize(n);
   	g.resize(2*n+1);
   	for(int i=0;i<n;++i){
   		int c;
   		cin>>c;
   		for(int j=0;j<c;++j){
   			int u;
   			cin>>u;
   			adj[i].push_back({--u,1});
   			g[ind(i,0)].push_back(ind(u,1));
   			g[ind(i,1)].push_back(ind(u,0));
   		}
   	}
   	p.resize(2*n+1);
   	int mp[2*n+1];
   	for(int i=0;i<n;++i){
   		mp[ind(i,0)]=i;
   		mp[ind(i,1)]=i;
   	}
   	cin>>st;--st;
   	calc(ind(st,1),ind(st,1));
   	exs = false;
   	string ans = "Lose\n";
   	vector<int> pth;
   	for(int i=0;i<n;++i){
   		// cout << vis[ind(i,0)] << ' ';
   		if(adj[i].size()==0 && vis[ind(i,0)]){
   			ans = "Win\n";
   			exs=true;
   			int cur = ind(i,0);
   			pth.push_back(mp[cur]);
   			while(cur!=ind(st,1)){
   				cur = p[cur];
   				pth.push_back(mp[cur]);
   			}
   			break;
   		}
   	}
   	// cout << endl;
   	if(exs){
   		cout << ans;
   		reverse(pth.begin(),pth.end());
   		for(auto it:pth){
   			cout << it+1 << ' ';
   		}
   		cout << endl;
   		return 0;
   	}
   	memset(vis,0,sizeof(vis));
   	dfs(st);
   	if(exs){
   		cout << "Draw\n";
   		return 0;
   	}
   	cout << ans;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define int long long

const int N = 1e5+10;

vector<vector<int>> adj;
vector<vector<int>> g;
vector<int> p,pth,mp;

bool vis[2*N];
bool rec[2*N];
bool exs;
int n,m,st;

void dfs(int node){
	vis[node]=true;
	rec[node]=true;
	for(auto i:adj[node]){
		if(rec[i]==true){
			exs=true;
			break;
		}
		if(!vis[i]){
			dfs(i);
		}
	}
	rec[node]=false;
	return;
}

int ind(int i,int par){
	return 2*i+1+par;
}

void calc(int node,int par){
	vis[node]=1;
	p[node] = par;
	for(auto i:g[node]){
		if(!vis[i]){
			p[i]=node;
			calc(i,node);
		}
	}
	return;
}

bool find_ans(int st){
	calc(ind(st,1),ind(st,1));
   	exs = false;
   	int res=false;
   	for(int i=0;i<n;++i){
   		if(adj[i].size()==0 && vis[ind(i,0)]){
   			res=true;
   			int cur = ind(i,0);
   			pth.push_back(mp[cur]);
   			while(cur!=ind(st,1)){
   				cur = p[cur];
   				pth.push_back(mp[cur]);
   			}
   			break;
   		}
   	}
   	return res;
}

int32_t main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
   	cin>>n>>m;
   	adj.resize(n);
   	g.resize(2*n+1);
   	for(int i=0;i<n;++i){
   		int c;
   		cin>>c;
   		for(int j=0;j<c;++j){
   			int u;
   			cin>>u;
   			adj[i].push_back(--u);
   			g[ind(i,0)].push_back(ind(u,1));
   			g[ind(i,1)].push_back(ind(u,0));
   		}
   	}
   	p.resize(2*n+1);
   	mp.resize(2*n+1);
   	for(int i=0;i<n;++i){
   		mp[ind(i,0)]=i;
   		mp[ind(i,1)]=i;
   	}
   	cin>>st;--st;
   	if(find_ans(st)){
   		cout << "Win\n";
   		reverse(pth.begin(),pth.end());
   		for(auto it:pth){
   			cout << it+1 << ' ';
   		}
   		cout << endl;
   		return 0;
   	}
   	memset(vis,0,sizeof(vis));
   	dfs(st);
   	if(exs)cout << "Draw\n";
   	else cout << "Lose\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

const int N = 1e5 + 100;

vector<int> gr[N];
int intm[N], outtm[N];

int par[N][2];

bool isDrawPossible(int v, int & tm) {
    intm[v] = ++tm;
    bool ret = false;
    for (auto u : gr[v]) {
        if (intm[u]) {
            ret |= intm[u] < intm[v] and not outtm[u];
        } else {
            ret |= isDrawPossible(u, tm);
        }
    }
    outtm[v] = ++tm;
    return ret;
}

int main()
{
    std::ios::sync_with_stdio(false);

    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= n; ++i) {
        int k;
        cin >> k;
        for (int j = 0; j < k; ++j) {
            int x;
            cin >> x;
            gr[i].push_back(x);
        }
    }
    int s;
    cin >> s;
    int tm = 0;
    bool drawPossible = isDrawPossible(s, tm);

    std::queue<pair<int, int>> q;
    q.push({s, 0});
    while (!q.empty()) {
        auto p = q.front();
        q.pop();

        int v = p.first, odd = p.second xor 1;
        for (auto u : gr[v]) {
            if (par[u][odd]) {
                continue;
            }

            par[u][odd] = v;
            q.push({u, odd});
        }
    }

    for (int i = 1; i <= n; ++i) {
        if (par[i][1] and gr[i].empty()) {
            vector<int> ans;
            int lst = i;
            int odd = 1;
            while (lst != 0) {
                ans.push_back(lst);
                lst = par[lst][odd];
                odd ^= 1;
            }
            reverse(ans.begin(), ans.end());
            cout << "Win\n";
            for (int i = 0; i < (int)ans.size(); ++i) {
                if (i) cout << ' ';
                cout << ans[i];
            }
            cout << '\n';
            return 0;
        }
    }

    if (drawPossible) {
        cout << "Draw\n";
        return 0;
    }

    cout << "Lose\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

const int N = 1e5 + 100;

vector<int> gr[N];
int intm[N], outtm[N];

int par[N][2];

bool isDrawPossible(int v, int & tm) {
    intm[v] = ++tm;
    bool ret = false;
    for (auto u : gr[v]) {
        if (intm[u]) {
            ret |= intm[u] < intm[v] and not outtm[u];
        } else {
            ret |= isDrawPossible(u, tm);
        }
    }
    outtm[v] = ++tm;
    return ret;
}

void go(int v) {
    std::queue<pair<int, int>> q;
    q.push({v, 0});
    while (!q.empty()) {
        auto p = q.front();
        q.pop();

        int v = p.first, odd = p.second xor 1;
        for (auto u : gr[v]) {
            if (par[u][odd]) {
                continue;
            }

            par[u][odd] = v;
            q.push({u, odd});
        }
    }
}

int main()
{
    std::ios::sync_with_stdio(false);

    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= n; ++i) {
        int k;
        cin >> k;
        for (int j = 0; j < k; ++j) {
            int x;
            cin >> x;
            gr[i].push_back(x);
        }
    }
    int s;
    cin >> s;
    int tm = 0;
    bool drawPossible = isDrawPossible(s, tm);

    go(s);

    for (int i = 1; i <= n; ++i) {
        if (par[i][1] and gr[i].empty()) {
            vector<int> ans;
            int lst = i;
            int odd = 1;
            while (lst != 0) {
                ans.push_back(lst);
                lst = par[lst][odd];
                odd ^= 1;
            }
            reverse(ans.begin(), ans.end());
            cout << "Win\n";
            for (int i = 0; i < (int)ans.size(); ++i) {
                if (i) cout << ' ';
                cout << ans[i];
            }
            cout << '\n';
            return 0;
        }
    }

    if (drawPossible) {
        cout << "Draw\n";
        return 0;
    }

    cout << "Lose\n";
    return 0;
}