#include <bits/stdc++.h>
using namespace std;
struct Edge {
  int v, id;
  Edge() {}
  Edge(int v, int id) : v(v), id(id) {}
};
vector<Edge> adj[11010];
struct Node {
  int p;
  long long dis;
  Node() {}
  Node(int p, long long dis) : p(p), dis(dis) {}
  friend bool operator<(const Node &a, const Node &b) { return a.dis > b.dis; }
};
priority_queue<Node> Q;
long long dis[11010][2];
int n, m, k, S1, S2, T, cost[11010];
int u[11010], v[11010], L[11010], R[11010];
void read() {
  scanf("%d %d %d %d %d %d", &n, &m, &k, &S1, &S2, &T);
  for (int i = 1, a, b, c; i <= m; ++i) {
    scanf("%d %d %d", &a, &b, &c);
    adj[a].push_back(Edge(b, i)), cost[i] = c;
  }
  for (int i = 1; i <= k; ++i) {
    scanf("%d %d %d %d", &u[i], &v[i], &L[i], &R[i]);
    adj[u[i]].push_back(Edge(v[i], i + m)), cost[i + m] = R[i];
  }
}
void print(string str) {
  cout << str << endl;
  if (str == "LOSE") exit(0);
  for (int i = m + 1; i <= m + k; ++i)
    printf("%d%c", cost[i], i < m + k ? ' ' : '\n');
  exit(0);
}
void Dijkstra(int S, int t) {
  static bool use[11010];
  for (int i = 1; i <= n; ++i)
    dis[i][t] = 1000000000000000000LL, use[i] = false;
  dis[S][t] = 0, Q.push(Node(S, 0));
  while (!Q.empty()) {
    Node h = Q.top();
    Q.pop();
    if (use[h.p]) continue;
    use[h.p] = true;
    for (vector<Edge>::iterator e = adj[h.p].begin(); e != adj[h.p].end(); ++e)
      if (dis[e->v][t] > h.dis + cost[e->id]) {
        dis[e->v][t] = h.dis + cost[e->id];
        Q.push(Node(e->v, dis[e->v][t]));
      }
  }
}
void Greedy() {
  Dijkstra(S1, 0), Dijkstra(S2, 1);
  if (dis[T][0] < dis[T][1]) print("WIN");
  bool mark = true;
  while (mark) {
    mark = false;
    for (int i = 1; i <= k; ++i)
      if (dis[u[i]][0] < dis[u[i]][1] && cost[i + m] == R[i]) {
        cost[i + m] = L[i], Dijkstra(S1, 0), Dijkstra(S2, 1);
        if (dis[T][0] < dis[T][1]) print("WIN");
        mark = true;
      }
  }
  print(dis[T][0] == dis[T][1] ? "DRAW" : "LOSE");
}
int main() {
  read();
  Greedy();
  return 0;
}
