#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e4, MAXK = 1e3;
int n, m, k, s1, s2, t;
int bel[MAXK + 5], l[MAXK + 5], r[MAXK + 5];
bool ins[MAXN + 5];
long long dis1[MAXN + 5], dis2[MAXN + 5];
struct Edge {
  int v, w, nxt;
  Edge() {}
  Edge(int V, int W, int Nxt) { v = V, w = W, nxt = Nxt; }
} Graph[4 * MAXN + 5];
int Head[MAXN + 5], tot;
void Add_Edge(int u, int v, int w) {
  Graph[++tot] = Edge(v, w, Head[u]);
  Head[u] = tot;
}
struct node {
  int u;
  long long dis;
  node() {}
  node(int U, long long Dis) { u = U, dis = Dis; }
  bool operator<(const node &oth) const { return dis > oth.dis; }
};
bool vis[MAXN + 5];
void Dijkstra(int s, long long *dis) {
  priority_queue<node> Que;
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; i++) dis[i] = 0x3f3f3f3f3f3f3f3f;
  Que.push(node(s, dis[s] = 0));
  while (!Que.empty()) {
    int u = Que.top().u;
    Que.pop();
    if (vis[u]) continue;
    for (int i = Head[u]; i; i = Graph[i].nxt) {
      int v = Graph[i].v, w = Graph[i].w;
      if (dis[v] > dis[u] + w) {
        dis[v] = dis[u] + w;
        Que.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);
    Add_Edge(u, v, w);
  }
  for (int i = 1, u, v; i <= k; i++) {
    scanf("%d %d %d %d", &u, &v, &l[i], &r[i]), bel[i] = u;
    Add_Edge(u, v, r[i]);
  }
  for (bool chk = 1; chk;) {
    chk = 0;
    Dijkstra(s1, dis1), Dijkstra(s2, dis2);
    for (int i = 1; i <= k; i++)
      if (dis1[bel[i]] <= dis2[bel[i]] && !ins[i])
        chk = ins[i] = 1, Graph[i + m].w = l[i];
  }
  if (dis1[t] > dis2[t])
    puts("LOSE");
  else {
    puts(dis1[t] < dis2[t] ? "WIN" : "DRAW");
    for (int i = 1; i <= k; i++) printf("%d ", Graph[i + m].w);
  }
  return 0;
}
