#include <bits/stdc++.h>
#define fastio cin.tie(0)->sync_with_stdio(0)
using namespace std;
using ll = long long;
using pii = pair<ll,ll>;
using db = long double;
unordered_set<int> res;
vector<vector<pii>> graph(5001);
vector<ll> ti;
int n,m,k;
const int po = 1<<5;
struct State{
ll cur,w,tickets;
//vector<ll> path;
bool operator<(const State& o) const{
return w>o.w;
}
};
ll dijkstra(int st){
vector<vector<ll>> dis(po,vector<ll>(n+1,4e18));
vector<vector<bool>> vis(po,vector<bool>(n+1,0));
dis[0][st]=0;
priority_queue<State> pq;
pq.push({st,0,0});
while (!pq.empty()){
State t=pq.top();pq.pop();
ll cur=t.cur,w=t.w;
ll tickets=t.tickets;
//cout << cur << " " << w << " " << tickets << "\n";
if (vis[tickets][cur]) continue;
//if (w > dis[tickets][cur]) continue;
vis[tickets][cur]=1;
for (pii i:graph[cur]){
ll nx=i.first,nw=i.second;
for (int j=-1;j<5;j++){
if (j==-1){
if (vis[tickets][nx]) continue;
if (dis[tickets][nx] <= nw+w) continue;
//vis[tickets][nx]=1;
dis[tickets][nx]=nw+dis[tickets][cur];
pq.push({nx,dis[tickets][nx],tickets});
}
else{
int ert=tickets|(1<<j);
if (ti[j]==-1) continue;
if ((tickets>>j)&1) continue;
if (vis[ert][nx]) continue;
if ((nw*((j+1)*0.1))<=ti[j]) continue;
//vis[ert][nx]=1;
dis[ert][nx]=dis[tickets][cur]+(nw*(1-(j+1)*0.1))+ti[j];
pq.push({nx,dis[ert][nx],ert});
}
}
}
}
ll mn=4e18;
for (int i:res){
for (int j=0;j<po;j++){
mn=min(mn,dis[j][i]);
}
}return mn;
}
int main(){
fastio;
cin >> n >> m >> k;
for (int i=0;i<k;i++){
int a;cin >> a;
res.insert(a);
}
for (int i=0;i<m;i++){
int st,en;ll c;
cin >> st >> en >> c;
graph[st].push_back({en,c});
}
int q;cin >> q;
for (int i=0;i<q;i++){
int st,p1,p2,p3,p4,p5;
cin >> st >> p1 >> p2 >> p3 >> p4 >> p5;
ti={p1,p2,p3,p4,p5};
ll ans=4e18;
ans=min(ans,dijkstra(st));
if (ans!=4e18)cout << ans << "\n";
else cout << -1 << "\n";
}
return 0;
}