#include <iostream>
#include <string>
#include <vector>
#include <cstdio>
#include <limits>



//#define debug


struct Food {
    std::vector<int> links;
    bool visited = false;
};

std::vector<Food> foods;
std::vector<int> visited;

std::vector<double> tab;
int F;
inline double& at(int from, int to) {
    return tab.at(from*F + to);
}

inline void dfs(int current){
    if (foods[current].visited){
        return;
    }

    foods[current].visited = true;
    visited.push_back(current);

    for (int i : foods[current].links){
        dfs(i);
    }
}

void FW() {
    for (int k = 0; k < F; ++k) {
        for (int i = 0; i < F; ++i) {
            for (int j = 0; j < F; ++j) {
                auto sum = at(i,k) + at(k,j);
                if (sum < at(i,j)) {
                    at(i,j) = sum;
                }
            }
        }
    }
}

int main() {
    std::ios::sync_with_stdio(false);
    int Fu, Fn, T;
    while (std::cin >> T >> F >> Fu >> Fn) {
        if (F == 0) break;
        Fu--; Fn--;
        tab.clear();
        tab.resize(F*F, std::numeric_limits<double>::max());

        foods.clear();
        foods.resize(F);

        for (int f = 0; f < F; ++f) {
            at(f,f) = 0;
        }

        for (int t = 0; t < T; ++t) {
            int Fr, Fg;
            double U;
            std::cin >> Fr >> Fg >> U;
            Fr--; Fg--;
            at(Fr, Fg) = -U;
            foods.at(Fr).links.push_back(Fg);
        }

        visited.clear();
        dfs(Fu);

        bool end_visited = foods[Fn].visited;

#ifdef debug
        std::cout << "Visited: " << end_visited << std::endl;
#endif

        if (end_visited){
            FW();
        }

        bool has_loop = false;

        std::vector<int> negative_starts;

        for (int i : visited){
            if (at(i, i) < 0){
                negative_starts.push_back(i);
            }
        }

        for (auto& f : foods){
            f.visited = false;
        }

        for (int i : negative_starts){
            dfs(i);
            if (foods[Fn].visited){
                has_loop = true;
                break;
            }
        }

        if (has_loop && end_visited){
            std::cout << "TRUE\n";
        } else {
            std::cout << "FALSE\n";
        }

    }
}