import java.io.*;
import java.util.*;

public class mean_as {

    class Arc {
        int s;
        int t;
        int w;
        int i;

        public Arc(int s, int d, int w, int i) {
            this.s = s;
            this.t = d;
            this.w = w;
            this.i = i;
        }
    }

    int n;
    int m;
    int s;
    ArrayList<Arc>[] arcs;
    Arc[] al;
    boolean[] ft;
    int[] as;
    int[] bs;

    public void run() throws IOException {
        Scanner in = new Scanner(new File("mean.in"));
        PrintWriter out = new PrintWriter(new File("mean.out"));

        n = in.nextInt();

        arcs = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            arcs[i] = new ArrayList<Arc>();
        }
        ft = new boolean[n];

        m = in.nextInt();
        String tmp = in.next();
        for (int i = 0; i < n; i++) {
            ft[i] = tmp.charAt(i) == 'A';
        }
        s = in.nextInt() - 1;

        al = new Arc[m];
        for (int i = 0; i < m; i++) {
            int s = in.nextInt() - 1;
            int t = in.nextInt() - 1;
            int w = in.nextInt();
            al[i] = new Arc(s, t, w, i + 1);
            arcs[s].add(al[i]);
        }

        as = new int[n];
        for (int i = 0; i < n; i++) {
            as[i] = in.nextInt() - 1;
        }

        int[][] d = new int[n + 1][n];
        Arc[][] f = new Arc[n + 1][n];
        for (int i = 0; i <= n; i++) {
            Arrays.fill(d[i], Integer.MAX_VALUE);
        }
        int[] db = new int[n];
        Arrays.fill(db, Integer.MAX_VALUE);

        d[0][s] = 0;
        for (int i = 0; i < n; i++) {
            for (int v = 0; v < n; v++) {
                if (d[i][v] < Integer.MAX_VALUE) {
                    if (ft[v]) {
                        Arc a = al[as[v]];
                        if (d[i + 1][a.t] > d[i][v] + a.w) {
                            d[i + 1][a.t] = d[i][v] + a.w;
                            f[i + 1][a.t] = a;
                        }
                    } else {
                        for (Arc a : arcs[v]) {
                            if (d[i + 1][a.t] > d[i][v] + a.w) {
                                d[i + 1][a.t] = d[i][v] + a.w;
                                f[i + 1][a.t] = a;
                            }
                        }
                    }
                }
            }
            for (int v = 0; v < n; v++) {
                if (d[i][v] < db[v]) {
                    db[v] = d[i][v];
                }
            }
        }

        boolean canLose = false;
        boolean canDraw = false;
        int fl = -1;
        for (int v = 0; v < n; v++) {
            if (db[v] < Integer.MAX_VALUE) {
                if (d[n][v] < db[v]) {
                    canLose = true;
                    fl = v;
                    break;
                }
                if (d[n][v] == db[v]) {
                    canDraw = true;
                    fl = v;
                }
            }
        }

        if (canLose || canDraw) {
            if (canLose) {
                out.println("Lose");
            } else {
                out.println("Draw");
            }

            int v = fl;
            int p = n;
            bs = new int[n];
            do {
                bs[f[p][v].s] = f[p][v].i;
                v = f[p][v].s;
                p--;
            } while (p != 0);

            for (int u = 0; u < n; u++) {
                if (ft[u]) {
                    out.print(0 + " ");
                } else {
                    if (bs[u] == 0) {
                        out.print(arcs[u].get(0).i + " ");
                    } else {
                        out.print(bs[u] + " ");
                    }
                }
            }
            out.println();
        } else {
            out.println("Win");
        }


        in.close();
        out.close();
    }

    public static void main(String[] arg) throws IOException {
        new mean_as().run();
    }
}
