#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 5, K = 1e2 + 5;
int n, m, k, s1, s2, f, L[N + K], R[N + K], To[N];
long long D[2][N];
priority_queue<pair<long long, pair<int, bool>>,
               vector<pair<long long, pair<int, bool>>>,
               greater<pair<long long, pair<int, bool>>>>
    pq;
bitset<N> B[2];
vector<int> adj[N];
int main() {
  scanf("%d%d%d%d%d%d", &n, &m, &k, &s1, &s2, &f);
  for (int i = 0; i < m; i++) {
    int a;
    scanf("%d%d%d", &a, &To[i], &L[i]);
    adj[a].push_back(i);
  }
  for (int i = m; i < m + k; i++) {
    int a;
    scanf("%d%d%d%d", &a, &To[i], &L[i], &R[i]);
    adj[a].push_back(i);
  }
  memset(D, 63, sizeof(D));
  D[0][s1] = D[1][s2] = 0;
  pq.push({0, {s1, 0}});
  pq.push({0, {s2, 1}});
  while (pq.size()) {
    pair<long long, pair<int, bool>> p = pq.top();
    pq.pop();
    int u = p.second.first;
    bool t = p.second.second;
    if (B[t][u]) continue;
    B[t][u] = 1;
    for (int x : adj[u]) {
      if (x >= m && t && D[1][u] < D[0][u]) L[x] = R[x];
      if (D[t][To[x]] > D[t][u] + L[x]) {
        D[t][To[x]] = D[t][u] + L[x];
        pq.push({D[t][To[x]], {To[x], t}});
      }
    }
  }
  if (D[0][f] > D[1][f]) return !printf("LOSE");
  if (D[0][f] == D[1][f])
    printf("DRAW\n");
  else
    printf("WIN\n");
  for (int i = m; i < m + k; i++) printf("%d ", L[i]);
}
