#include using namespace std; using ll=long long; namespace Lib { struct BIT { vector a; int sz; BIT(int n) : sz(n), a(n + 1) {} void add(int p, int v) { for (p += 1; p <= sz; p += p & -p) a[p] += v; } ll sum(int l, int r) { ll ret = 0; for (; r > 0; r -= r & -r) ret += a[r]; for (; l > 0; l -= l & -l) ret -= a[l]; return ret; } }; } // namespace Lib int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N,M,K; cin>>N>>M>>K; vector S(K+1,0); for(int &i:S)cin>>i,--i; vector dist(N,vector(N,(ll)1e18)); for(int i=0;i>A>>B>>C; --A,--B; dist[A][B]=C; dist[B][A]=C; } for(int i=0;i>Q; while(Q--){ int T,X,Y; cin>>T>>X>>Y; if(T==1){ --Y; if(X>0)seg.add(X-1,-dist[S[X-1]][S[X]]); if(X0)seg.add(X-1,dist[S[X-1]][S[X]]); if(X