#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000ll * 1000 * 1000 * 1000 * 1000 * 100 + 10;
const int MAXN = 100 * 100 + 10;
long long ans[MAXN], lw[MAXN], d[2][MAXN];
vector<int> ng[MAXN], ngK[MAXN], edge[MAXN];
vector<long long> w[MAXN];
set<int> rem[MAXN];
bool mark[MAXN];
set<pair<long long, int> > que[2];
void dij(int x, int id) {
  que[id].clear();
  for (int i = 0; i < MAXN; i++) d[id][i] = INF, mark[i] = false;
  que[id].insert(pair<long long, int>(0ll, x));
  while (!que[id].empty()) {
    pair<long long, int> cur = *que[id].begin();
    que[id].erase(que[id].begin());
    int v = cur.second;
    d[id][v] = cur.first;
    mark[v] = true;
    for (int i = 0; i < ng[v].size(); i++) {
      int u = ng[v][i];
      if (mark[u]) continue;
      if (d[id][v] + w[v][i] < d[id][u]) {
        que[id].erase(pair<long long, int>(d[id][u], u));
        d[id][u] = d[id][v] + w[v][i];
        que[id].insert(pair<long long, int>(d[id][u], u));
      }
    }
    for (int i = 0; i < ngK[v].size(); i++) {
      int u = ngK[v][i];
      if (mark[u]) continue;
      if (d[id][v] + ans[edge[v][i]] < d[id][u]) {
        que[id].erase(pair<long long, int>(d[id][u], u));
        d[id][u] = d[id][v] + ans[edge[v][i]];
        que[id].insert(pair<long long, int>(d[id][u], u));
      }
    }
  }
}
int main() {
  int n, m, k, s1, s2, f;
  cin >> n >> m >> k >> s1 >> s2 >> f;
  s1--;
  s2--;
  f--;
  for (int i = 0; i < m; i++) {
    int x, y, z;
    cin >> x >> y >> z;
    x--;
    y--;
    ng[x].push_back(y);
    w[x].push_back(z);
  }
  for (int i = 0; i < k; i++) {
    int x, y, l, r;
    cin >> x >> y >> l >> r;
    x--;
    y--;
    lw[i] = l;
    ans[i] = r;
    ngK[x].push_back(y);
    edge[x].push_back(i);
    rem[x].insert(i);
  }
  for (int i = 0; i < k; i++) {
    dij(s1, 0);
    dij(s2, 1);
    for (int j = 0; j < n; j++)
      if (d[0][j] < d[1][j]) {
        for (set<int>::iterator it = rem[j].begin(); it != rem[j].end(); it++)
          ans[*it] = lw[*it];
        rem[j].clear();
      }
  }
  dij(s1, 0);
  dij(s2, 1);
  if (d[0][f] <= d[1][f]) {
    cout << (d[0][f] == d[1][f] ? "DRAW" : "WIN") << endl;
    for (int i = 0; i < k; i++) cout << ans[i] << " ";
    cout << endl;
  } else
    cout << "LOSE" << endl;
  return 0;
}
