#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10010, MAXK = 105;
const long long INF = 1e18;
long long dist[2][MAXN];
vector<pair<long long, long long> > V[MAXN], Poc[MAXN];
int poc[2], kraj;
int n, m, k;
int a[MAXK], b[MAXK], l[MAXK], r[MAXK];
int rje[MAXK];
int pravrje[MAXK];
void Dijkstra(int ind) {
  set<pair<long long, long long> > S;
  for (int i = 0; i < n; i++) dist[ind][i] = INF;
  dist[ind][poc[ind]] = 0;
  S.insert(pair<long long, long long>(0, poc[ind]));
  for (; !S.empty();) {
    auto tmp = *S.begin();
    S.erase(S.begin());
    for (auto it : V[tmp.second]) {
      long long ndist = tmp.first + it.second;
      if (dist[ind][it.first] > ndist) {
        S.erase(pair<long long, long long>(dist[ind][it.first], it.first));
        dist[ind][it.first] = ndist;
        S.insert(pair<long long, long long>(dist[ind][it.first], it.first));
      }
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  scanf("%d%d%d", &poc[0], &poc[1], &kraj);
  poc[0]--;
  poc[1]--;
  kraj--;
  for (int i = 0; i < m; i++) {
    int aa, bb, cc;
    scanf("%d%d%d", &aa, &bb, &cc);
    aa--;
    bb--;
    Poc[aa].push_back(pair<long long, long long>(bb, cc));
  }
  for (int i = 0; i < k; i++) {
    scanf("%d%d%d%d", &a[i], &b[i], &l[i], &r[i]);
    a[i]--;
    b[i]--;
  }
  int moze[2] = {0, 0};
  for (int st = 0; st < 2; st++) {
    memset(rje, 0, sizeof rje);
    for (;;) {
      for (int i = 0; i < n; i++) V[i] = Poc[i];
      for (int i = 0; i < k; i++)
        V[a[i]].push_back(
            pair<long long, long long>(b[i], rje[i] ? rje[i] : r[i]));
      Dijkstra(0);
      Dijkstra(1);
      int ind = -1;
      long long minn = INF;
      for (int i = 0; i < k; i++) {
        if (!rje[i] && min(dist[0][a[i]], dist[1][a[i]]) < minn) {
          minn = min(dist[0][a[i]], dist[1][a[i]]);
          ind = i;
        }
      }
      if (ind == -1) break;
      if (dist[0][a[ind]] < dist[1][a[ind]])
        rje[ind] = l[ind];
      else if (dist[0][a[ind]] > dist[1][a[ind]])
        rje[ind] = r[ind];
      else if (!st)
        rje[ind] = r[ind];
      else
        rje[ind] = l[ind];
    }
    if (dist[0][kraj] < dist[1][kraj]) {
      moze[0] = 1;
      memcpy(pravrje, rje, sizeof rje);
    } else if (dist[0][kraj] == dist[1][kraj] && !moze[0]) {
      moze[1] = 1;
      memcpy(pravrje, rje, sizeof rje);
    }
  }
  if (moze[0] || moze[1]) {
    printf("%s\n", moze[0] ? "WIN" : "DRAW");
    for (int i = 0; i < k; i++) printf("%d ", pravrje[i] ? pravrje[i] : r[i]);
    printf("\n");
  } else
    printf("LOSE\n");
  return 0;
}
