#include <bits/stdc++.h>
using namespace std;
const int N = 5e5;
const long long INF = 1e18;
int r[N], fst[N], nxt[N], cg[N], l[N], n, m, k, S1, S2, T, mm, tu[N];
long long dis1[N], dis2[N];
struct Node {
  int u;
  long long w;
  bool operator<(const Node &a) const { return w > a.w; }
};
struct Edge {
  int v, w;
} e[N];
priority_queue<Node> q;
void ade(int u, int v, int w) {
  e[++mm] = (Edge){v, w}, nxt[mm] = fst[u], fst[u] = mm;
}
void dijkstra(int S, long long dis[]) {
  for (int i = 1; i <= n; ++i) dis[i] = INF;
  dis[S] = 0;
  q.push((Node){S, 0});
  while (!q.empty()) {
    Node t = q.top();
    q.pop();
    if (dis[t.u] < t.w) continue;
    for (int i = fst[t.u]; i; i = nxt[i]) {
      int v = e[i].v;
      if (t.w + e[i].w < dis[v]) {
        dis[v] = t.w + e[i].w;
        q.push((Node){v, dis[v]});
      }
    }
  }
}
int main() {
  scanf("%d %d %d", &n, &m, &k);
  scanf("%d %d %d", &S1, &S2, &T);
  for (int i = 1, u, v, w; i <= m; ++i)
    scanf("%d %d %d", &u, &v, &w), ade(u, v, w);
  for (int i = 1, u, v; i <= k; ++i)
    scanf("%d %d %d %d", &u, &v, &l[i], &r[i]), ade(u, v, r[i]), tu[i] = u;
  while (1) {
    int pd = 0;
    dijkstra(S1, dis1);
    dijkstra(S2, dis2);
    for (int i = 1; i <= k; ++i)
      if (dis1[tu[i]] <= dis2[tu[i]] && !cg[i])
        pd = 1, e[i + m].w = l[i], cg[i] = 1;
    if (!pd) break;
  }
  if (dis1[T] > dis2[T])
    puts("LOSE");
  else {
    if (dis1[T] == dis2[T])
      puts("DRAW");
    else
      puts("WIN");
    for (int i = 1; i <= k; ++i) printf("%d ", e[i + m].w);
    puts("");
  }
  return 0;
}
