#include <bits/stdc++.h>
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("O8")
#pragma GCC optimization("unroll-loops")
using namespace std;
const long long int N = 1e4 + 20, mod = 1e9, inf = 4e18, maxm = 2e5 + 20;
const long double eps = 0.0001;
int n, m, k, s1, s2, f;
long long int ans[N], d[N];
vector<pair<pair<int, int>, int> > adj[N];
int vis[N];
void dij() {
  set<pair<int, int> > st;
  st.insert({0, s1});
  st.insert({0, s2});
  vis[s1] = 1;
  vis[s2] = 2;
  d[s1] = 0;
  d[s2] = 0;
  while (!st.empty()) {
    pair<int, int> p = *(st.begin());
    st.erase(st.begin());
    int v = p.second;
    for (auto u : adj[v]) {
      long long int w;
      if (u.second)
        w = ans[u.second];
      else
        w = u.first.second;
      if (d[u.first.first] > d[v] + w) {
        st.erase({d[u.first.first], u.first.first});
        d[u.first.first] = d[v] + w;
        vis[u.first.first] = vis[v];
        st.insert({d[u.first.first], u.first.first});
      }
    }
  }
}
void dij2(int s) {
  set<pair<int, int> > st;
  st.insert({0, s});
  d[s] = 0;
  while (!st.empty()) {
    pair<int, int> p = *(st.begin());
    st.erase(st.begin());
    int v = p.second;
    for (auto u : adj[v]) {
      long long int w;
      if (u.second)
        w = ans[u.second];
      else
        w = u.first.second;
      if (d[u.first.first] > d[v] + w) {
        st.erase({d[u.first.first], u.first.first});
        d[u.first.first] = d[v] + w;
        st.insert({d[u.first.first], u.first.first});
      }
    }
  }
}
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k >> s1 >> s2 >> f;
  for (long long int i = 0; i < m; i++) {
    int u, v, w;
    cin >> u >> v >> w;
    adj[u].push_back({{v, w}, 0});
  }
  for (long long int i = 1; i < k + 1; i++) {
    int u, v, l, r;
    cin >> u >> v >> l >> r;
    adj[u].push_back({{v, l}, i});
    ans[i] = r;
  }
  for (long long int i = 0; i < k; i++) {
    memset(d, 63, sizeof d);
    dij();
    for (long long int i = 1; i < n + 1; i++)
      if (vis[i] == 1)
        for (auto u : adj[i])
          if (u.second) ans[u.second] = u.first.second;
  }
  memset(d, 63, sizeof d);
  long long int a;
  dij2(s1);
  a = d[f];
  memset(d, 63, sizeof d);
  dij2(s2);
  if (d[f] < a) {
    cout << "LOSE" << '\n';
    return 0;
  }
  if (d[f] == a)
    cout << "DRAW" << '\n';
  else
    cout << "WIN" << '\n';
  for (long long int i = 1; i < k + 1; i++) {
    cout << ans[i] << ' ';
  }
  return 0;
}
