#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
#include<string.h>
#include<math.h>
#include<queue>
#define sc scanf
#define pr printf
#define ct continue
#define re return
#define fr(i,t,n) for(int i = t; i <=n ; i++)
#define me(a,i) memset(a,i,sizeof(a))
#define ffr(x) for(int i = head[(x)] ; i!= -1 ; i = ed[i].nt)
using namespace std;
const int maxn = 110;
const int maxm = 220;
struct node
{
    int v,t,fee,nt;
} ed[maxm];
struct ps
{
    int nowv,nowt,nowspace,nowbag;
    ps(int a , int b , int c ,int d):nowv(a),nowt(b),nowspace(c),nowbag(d){}
    ps(){}
};
int n , m , B ,K ,R,ec,head[maxn],T;
void add(int u,int v, int t, int fee)
{
//    pr("%d %d\n",u,v);
    ed[++ec].v = v;
//    head[u] = ec;
    ed[ec].nt = head[u];
    head[u] = ec;
    ed[ec].t = t;
    ed[ec].fee =fee;
}
int price[maxn][55];
void init()
{
    ec = -1,me(head,-1);
    sc("%d%d%d%d%d%d",&n,&m,&B,&K,&R,&T);
    fr(i,1,n)
    fr(j,0,K-1)sc("%d",&price[i][j]);
    fr(i,1,m)
    {
        int a, b, c,d;
        sc("%d%d%d%d",&a,&b,&c,&d);
        add(a,b,c,d);
    }
}
int opt[maxn][maxm][11][11];

void solve()
{
    queue<ps>ok;
    ok.push(ps(1,0,0,0));
    fr(i,1,n)
      fr(j,0,T)
        fr(k,0,K)
          fr(l,0,B)opt[i][j][k][l]= -1;
    opt[1][0][0][0] = R;
    int res = -1;
    while(!ok.empty())
    {
        ps a = ok.front();
        ok.pop();
        int x = a.nowv;
        int hehe = opt[x][a.nowt][a.nowspace][a.nowbag];
        pr("v = %d , sp = %d , t = %d bag = %d  %d\n",a.nowv,a.nowspace,a.nowt,a.nowbag,hehe);
        if(x == n && a.nowspace == 0 && a.nowt == T)res = max(res,opt[x][a.nowt][a.nowspace][a.nowbag]);
//        if(x == n)ct;

        if(x != 1 && x != n)
        {
            int bag = a.nowbag;
            fr(j,a.nowbag+1,B)
            {
                int p = opt[x][a.nowt][a.nowspace][j];
                if(p < hehe + price[x][a.nowspace])
                {
                    opt[x][a.nowt][a.nowspace][j] = hehe + price[x][a.nowspace];
                    ok.push(ps(x,a.nowt,a.nowspace,j));
                }
            }
            fr(j,0,a.nowbag-1)
            {
                int p = opt[x][a.nowt][a.nowspace][j];
                if(p < hehe - price[x][a.nowspace])
                {
                    opt[x][a.nowt][a.nowspace][j] = hehe - price[x][a.nowspace];
                    ok.push(ps(x,a.nowt,a.nowspace,j));
                }
            }
        }
        if(a.nowt+1 <= T && opt[x][a.nowt+1][(a.nowspace+1)%K][a.nowbag] < hehe)
        {
            opt[x][a.nowt+1][(a.nowspace+1)%K][a.nowbag] = hehe;
            ok.push(ps(x,a.nowt+1,(a.nowspace+1)%K,a.nowbag));
        }
//        if(x == n)ct;
        for(int i = head[x] ; i != -1 ; i = ed[i].nt)
        {
            int v = ed[i].v;
//            pr("v = %d fe = %d t = %d\n",v,hehe-ed[i].fee,ed[i].t+a.nowt);
            if(hehe - ed[i].fee < 0 || ed[i].t + a.nowt > T)ct;
            if(v == n || v == 1)
              if(a.nowspace != 0)ct;
//            puts("fuck");
            if(opt[v][a.nowt+ed[i].t][a.nowspace][a.nowbag] < hehe - ed[i].fee)
            {
                opt[v][a.nowt+ed[i].t][a.nowspace][a.nowbag] = hehe - ed[i].fee;
                ok.push(ps(v,a.nowt+ed[i].t,a.nowspace,a.nowbag));
            }
        }
    }
    if(res != -1)pr("%d\n",res);
    else puts("Forever Alone");
}
int main()
{
    int test,cas=1;
    freopen("2.in","r",stdin);
    sc("%d",&test);
    while(test--)
    {
        init();
//        pr("Case #%d: ",cas++);
        solve();
    }
}