#include <bits/stdc++.h>
using namespace std;
struct road {
  int v, lmin, lmax;
  int ind;
  road(int v, int l) : v(v), lmin(l), lmax(l) { ind = -1; }
  road(int v, int lmin, int lmax, int i)
      : v(v), lmin(lmin), lmax(lmax), ind(i) {}
};
int n, m, k;
vector<road> G[10000];
int ans[10000];
long long dists1[10000];
long long dists2[10000];
int s1p[10000];
void dijkstra(int s, long long* dists, int f, bool (*pred)(int x),
              int (*weight)(int v, road x)) {
  set<pair<long long, int> > queue;
  for (int i = 0; i < n; i++) {
    if (i == s) {
      queue.insert(make_pair(0, s));
      dists[i] = 0;
    } else {
      queue.insert(make_pair(1000000000000000010LL, i));
      dists[i] = 1000000000000000010LL;
    }
  }
  while (!queue.empty()) {
    int v = queue.begin()->second;
    long long d = queue.begin()->first;
    queue.erase(queue.begin());
    if (pred(v))
      for (int i = 0; i < G[v].size(); i++) {
        if (dists[G[v][i].v] > dists[v] + weight(v, G[v][i])) {
          queue.erase(make_pair(dists[G[v][i].v], G[v][i].v));
          dists[G[v][i].v] = dists[v] + weight(v, G[v][i]);
          queue.insert(make_pair(dists[G[v][i].v], G[v][i].v));
        }
      }
  }
}
int maxweight(int v, road x) { return x.lmax; }
bool retrue(int x) { return true; }
bool predlt(int v) { return dists2[v] > dists1[v]; }
bool predle(int v) { return dists2[v] >= dists1[v]; }
int minweight(int v, road x) { return x.lmin; }
int eweight(int v, road x) {
  if (dists1[v] == dists2[v])
    return x.lmax;
  else
    return x.lmin;
}
int main() {
  ios_base::sync_with_stdio(false);
  int s1, s2, f;
  cin >> n >> m >> k;
  cin >> s1 >> s2 >> f;
  s1--;
  s2--;
  f--;
  for (int i = 0; i < m; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    a--;
    b--;
    G[a].push_back(road(b, c));
  }
  for (int i = 0; i < k; i++) {
    int a, b, l, r;
    cin >> a >> b >> l >> r;
    a--;
    b--;
    G[a].push_back(road(b, l, r, i));
    ans[i] = r;
  }
  dijkstra(s2, dists2, f, retrue, maxweight);
  dijkstra(s1, dists1, f, predlt, minweight);
  if (dists1[f] < dists2[f]) {
    cout << "WIN\n";
    for (int i = 0; i < n; i++)
      if (dists1[i] < dists2[i])
        for (int j = 0; j < G[i].size(); j++)
          if (G[i][j].ind != -1) ans[G[i][j].ind] = G[i][j].lmin;
    for (int i = 0; i < k; i++) cout << ans[i] << " ";
  } else {
    dijkstra(s1, dists1, f, predle, eweight);
    for (int i = 0; i < n; i++)
      if (dists1[i] <= dists2[i])
        for (int j = 0; j < G[i].size(); j++)
          if (G[i][j].ind != -1) ans[G[i][j].ind] = G[i][j].lmin;
    if (dists1[f] == dists2[f]) {
      cout << "DRAW\n";
      for (int i = 0; i < k; i++) cout << ans[i] << " ";
    } else
      cout << "LOSE";
  }
}
