#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
struct edge {
  int y, frt, val;
  void Set(int yr, int fr, int vl) { y = yr, frt = fr, val = vl; }
} g[30100];
int n, m, k, s1, s2, t, gsz, pos[30100], x[110], l[110], head, tail, q[1000000],
    r[110];
bool inq[30100], f[110];
long long dt1[30100], dt2[30100];
inline void AE(int x, int y, int val) {
  g[++gsz].Set(y, pos[x], val), pos[x] = gsz;
}
inline bool RlxN(long long &x, long long y) {
  if (x > y) {
    x = y;
    return true;
  }
  return false;
}
void SPFA(int S, int T, long long *dt) {
  for (int i = 1; i <= n; i++) dt[i] = 1LL << 55, inq[i] = 0;
  inq[q[head = tail = 1] = S] = true, dt[S] = 0;
  while (head <= tail) {
    int x = q[head++];
    for (int i = pos[x]; i; i = g[i].frt)
      if (RlxN(dt[g[i].y], dt[x] + g[i].val) && !inq[g[i].y])
        inq[q[++tail] = g[i].y] = true;
    inq[x] = false;
  }
}
inline void Upd() { SPFA(s1, t, dt1), SPFA(s2, t, dt2); }
int main() {
  scanf("%d%d%d%d%d%d", &n, &m, &k, &s1, &s2, &t);
  int t1, t2, t3;
  for (int i = 1; i <= m; i++) scanf("%d%d%d", &t1, &t2, &t3), AE(t1, t2, t3);
  for (int i = 1; i <= k; i++)
    scanf("%d%d%d%d", &x[i], &t2, &l[i], &r[i]), AE(x[i], t2, r[i]);
  Upd();
  for (int p = 1; p <= k; p++)
    for (int i = 1; i <= k; i++) {
      int a = x[i];
      if (g[m + i].val != l[i] && dt1[a] <= dt2[a])
        g[m + i].val = l[i], Upd(), f[i] = 1;
    }
  if (dt1[t] > dt2[t]) {
    printf("LOSE\n");
    return 0;
  }
  printf("%s\n", dt1[t] < dt2[t] ? "WIN" : "DRAW");
  for (int i = 1; i <= k; i++) printf("%d ", f[i] ? l[i] : r[i]);
  putchar('\n');
  return 0;
}
