题目链接:https://vjudge.net/contest/303643#problem/B
#include<bits/stdc++.h>
using namespace std;
#define debug puts("YES");
#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)
#define ll long long
#define lrt int l,int r,int rt
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define root l,r,rt
#define mst(a,b) memset((a),(b),sizeof(a))
#define pii pair<int,int>
#define fi first
#define se second
#define mk(x,y) make_pair(x,y)
const int mod=1e9+7;
const int maxn=1e5+10;
const int ub=1e6;
ll powmod(ll x,ll y){ll t; for(t=1;y;y>>=1,x=x*x%mod) if(y&1) t=t*x%mod; return t;}
ll gcd(ll x,ll y){
if(y==0) return x;
return gcd(y,x%y);
}
vector<int> g[maxn];
int n,m,x,tied=0,fg=0,fs=0,fc=0;
int vis[2][maxn],nxt[2][maxn],mark[maxn];
void dfs(int u,int pre,int s){
if(fg) return ;
if(mark[u]) tied=1;
if(vis[s][u]) return ;
vis[s][u]=1,nxt[s][u]=pre,mark[u]=1;
rep(i,0,g[u].size()){
dfs(g[u][i],u,s^1);
}
if(g[u].size()==0&&s) fg=u;
mark[u]=0;
}
void output(int u,int y){
if(u==0) return ;
output(nxt[y][u],y^1);
if(u!=x||y) cout<<" ";
cout<<u;
}
int main(){
ios::sync_with_stdio(false);
cin>>n>>m;
rep(i,1,n+1){
int t;cin>>t;
rep(j,0,t){
cin>>x;
g[i].push_back(x);
}
}
cin>>x;
mst(nxt,-1);
dfs(x,0,0);
if(fg){
cout<<"Win\n";
output(fg,1);
}
else if(tied) cout<<"Draw\n";
else cout<<"Lose\n";
return 0;
}
/*
4 4
1 2
1 3
2 1 4
0
1
*/