#include <bits/stdc++.h>
using namespace std;
const long long inf = 1008600110086001LL;
vector<pair<long long, long long> > G[10005];
long long dis[3][10005];
struct SpEdge {
  long long u, v, l, r, val;
} edge[105];
long long n, m, k, s1, s2, t, fm[105];
bool changed[105];
void Dijkstra(long long s, long long who) {
  priority_queue<pair<long long, long long> > Q;
  for (long long i = 1; i <= n; ++i) dis[who][i] = inf;
  dis[who][s] = 0;
  Q.push(make_pair(0, s));
  while (Q.size()) {
    long long v = Q.top().second;
    Q.pop();
    for (unsigned long long i = 0; i < G[v].size(); ++i) {
      long long to = G[v][i].first, cost = G[v][i].second;
      if (dis[who][to] > dis[who][v] + cost) {
        dis[who][to] = dis[who][v] + cost;
        Q.push(make_pair(dis[who][to], to));
      }
    }
  }
}
int main() {
  scanf("%lld %lld %lld", &n, &m, &k);
  scanf("%lld %lld %lld", &s1, &s2, &t);
  for (long long i = 1; i <= m; ++i) {
    long long u, v, val;
    scanf("%lld %lld %lld", &u, &v, &val);
    G[u].push_back(make_pair(v, val));
  }
  for (long long i = 1; i <= k; ++i) {
    scanf("%lld %lld %lld %lld", &edge[i].u, &edge[i].v, &edge[i].l,
          &edge[i].r);
    G[edge[i].u].push_back(make_pair(edge[i].v, edge[i].r));
    edge[i].val = edge[i].r;
    fm[i] = edge[i].u;
  }
  long long Last = 0, cnt = 0;
  for (;;) {
    Dijkstra(s1, 1);
    Dijkstra(s2, 2);
    for (long long i = 1; i <= k; ++i) {
      if (dis[1][fm[i]] <= dis[2][fm[i]] && !changed[i]) {
        long long to = edge[i].u;
        for (unsigned long long j = 0; j < G[to].size(); ++j) {
          if (G[to][j].first == edge[i].v) {
            G[to][j].second = edge[i].l;
            edge[i].val = edge[i].l;
            break;
          }
        }
        changed[i] = true;
        ++cnt;
      }
    }
    if (cnt == Last) break;
    Last = cnt;
  }
  if (dis[1][t] > dis[2][t])
    puts("LOSE");
  else if (dis[1][t] == dis[2][t]) {
    puts("DRAW");
    for (long long i = 1; i <= k; ++i) printf("%lld ", edge[i].val);
  } else {
    puts("WIN");
    for (long long i = 1; i <= k; ++i) printf("%lld ", edge[i].val);
  }
  return 0;
}
