#include <bits/stdc++.h>
using namespace std;
const int N = 10002;
const int mod = 1e9 + 7;
const int inf = 2e9;
const long long Inf = 2e18;
int n, m, k, s[2], t, a[N], b[N], l[N], r[N];
vector<int> ad[N];
vector<pair<int, int> > adj[N];
long long d[N][2];
void dick(int id) {
  priority_queue<pair<long long, int>, vector<pair<long long, int> >,
                 greater<pair<long long, int> > >
      q;
  for (int i = 1; i <= n; ++i) d[i][id] = Inf;
  d[s[id]][id] = 0;
  q.push(pair<long long, int>(0, s[id]));
  while (q.size()) {
    pair<long long, int> top = q.top();
    long long pd = top.first;
    int p = top.second;
    q.pop();
    if (pd != d[p][id]) continue;
    for (pair<int, int> x : adj[p])
      if (pd + x.second < d[x.first][id]) {
        d[x.first][id] = pd + x.second;
        q.push(pair<long long, int>(d[x.first][id], x.first));
      }
    for (int x : ad[p]) {
      int u = b[x];
      int w = r[x];
      if (pd + w < d[u][id]) {
        d[u][id] = pd + w;
        q.push(pair<long long, int>(d[u][id], u));
      }
    }
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  cin >> s[0] >> s[1] >> t;
  for (int i = 1; i <= m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    adj[u].push_back({v, w});
  }
  for (int i = 1; i <= k; ++i) {
    cin >> a[i] >> b[i] >> l[i] >> r[i];
    ad[a[i]].push_back(i);
  }
  while (1) {
    dick(0), dick(1);
    bool ok = 0;
    for (int i = 1; i <= k; ++i)
      if (l[i] < r[i]) {
        int u = a[i];
        if (d[u][0] < d[u][1]) {
          r[i] = l[i];
          ok = 1;
          break;
        }
      }
    if (!ok) break;
  }
  dick(0), dick(1);
  if (d[t][0] > d[t][1]) {
    cout << "LOSE";
    return 0;
  }
  if (d[t][0] < d[t][1])
    cout << "WIN" << '\n';
  else
    cout << "DRAW" << '\n';
  for (int i = 1; i <= k; ++i) cout << r[i] << ' ';
  return 0;
}
