#include<iostream>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<utility>
using namespace std;

int main(){
    int N, M;
    for(int tc=1;1;++tc){
        cin>>N>>M;
        if(!N) return 0;

        // Nが小さいため、ここで定義してむ構わない
        int s,t,H;
        int least[110]={0,}; //least damage
        int checked[110]={0,};
        vector<int> next_room[110], w[110];
        map<int,int> edge_to_boss;

        while(M--){
            int fi,ti,wi;
            cin>>fi>>ti>>wi;

            next_room[fi].push_back(ti);
            w[fi].push_back(-wi);
        }
        cin>>s>>t>>H;

        // init
        for(int i=0;i<N;++i){
            least[i] = H;
        }
        least[s] = 0;

        checked[t] = 1;

        // memorize the edges to boss room
        for(int here=0;here<N;++here){
            if(here==t) continue;
            for(int j=0;j<next_room[here].size();++j){
                int next = next_room[here][j];
                int eff = w[here][j];

                if(next == t){
                    if(edge_to_boss.find(here) == edge_to_boss.end()){
                        edge_to_boss[here] = eff;
                    }
                    else{
                        edge_to_boss[here] = min(edge_to_boss[here],eff);
                    }
                }
            }
        }

        int source = s;
        for(int cnt1=1; cnt1<N;++cnt1){ // 1サイクル当たり頂点1つが無視されるので、N-1回で十分
            //least[source] == 0, checked[source] == 0

            int g = N; //次の始点(距離ゼロの頂点)が決まったらすぐ移行する

            for(int j=0;j<next_room[source].size();++j){
                int adj = next_room[source][j], eff = max(0,w[source][j]);
                if(checked[adj] || adj==source) continue;

                least[adj] = min(least[adj], eff);
                if(least[adj]==0){
                    g = adj;
                }

            }
            checked[source] = 1; //delete(ignore) room 'source'

            if(g < N){
                source = g;
                continue;
            }

            //Bellman-Ford
            for(int cnt2=N-cnt1+1; cnt2; --cnt2){
                //relaxation
                for(int fi=0;fi<N;++fi){
                    if(checked[fi]) continue; //skip ignored
                    if(least[fi]>=H) continue; //skip unreachable rooms
                    for(int j=0;j<next_room[fi].size();++j){
                        int ti = next_room[fi][j], wi = w[fi][j];
                        if(checked[ti]) continue;

                        least[ti] = min(least[ti],max(0,least[fi]+wi));
                        if(least[ti]==0){
                            g = ti; break;
                        }
                    }
                    if(g<N) break;
                }
                if(g<N) break;
            }
            if(g < N){
                source = g;
                continue;
            }

            //処理すべき回路はあるか？
            int p = N;
            for(int fi=0;fi<N;++fi){
                if(checked[fi]) continue;
                if(least[fi]>=H) continue; //skip unreachable rooms
                for(int j=0;j<next_room[fi].size();++j){
                    int ti = next_room[fi][j], wi = w[fi][j];
                    if(checked[ti]) continue;

                    //辺 fi->tiを含む回路でより短くできる
                    if(0>least[fi]+wi){
                        least[ti] = 0;
                        g = ti; break;
                    }
                    if(least[ti] > least[fi]+wi){
                        p = ti; break;
                    }
                }
                if(g<N || p<N) break;
            }
            if(g < N){
                source = g;
                continue;
            }

            //処理すべき負回路はない。
            if(p == N){
                break;
            }

            //pから行けるところ全探索
            int reach[110]={0,},score[110]={0,},minscore = 0;
            g = p;
            queue<int> Q;
            Q.push(p);
            while(!Q.empty()){
                int now = Q.front();
                reach[now] = 1;
                for(int j=0;j<next_room[now].size();++j){
                    int next = next_room[now][j];
                    if(checked[next] || reach[next]) continue;

                    score[next] = score[now] + w[now][j];
                    if(minscore>score[next]){
                        minscore=score[next];
                        g = next;
                    }
                    Q.push(next);
                }
                Q.pop();
            }

            least[g] = 0;
            source = g;
        }

        for(int i=0;i<N;++i){
            if(i == t || least[i] == H || edge_to_boss.find(i) == edge_to_boss.end()) continue;
            least[t] = min(least[t],max(0,least[i]+edge_to_boss[i]));
        }

        cout<<"Case "<<tc<<": ";
        if(least[t] >= H){
            cout << "GAME OVER" << endl;
        }
        else{
            cout << (H-least[t]) << endl;
        }
    }
}



Measured memory_bytes: 3204