#include <bits/stdc++.h>   #pragma optimize( SEX_ON_THE_BEACH )   #pragma GCC optimize( unroll-loops )   #pragma GCC optimize( O3 )   #pragma GCC optimize( fast-math )   using ll = long long int;   using ull = long long int;   using dd = double;   using ldd = long double;   namespace Hashes {   const int mod197 = 1e9 + 7;   const int mod199 = 1e9 + 9;   const int modfft = 998244353;   int MOD = mod197;   template <typename T = int>   struct Hash {     T me, mod;     Hash() {}     Hash(T _me, T _mod = MOD) {       me = _me, mod = _mod;       if (me >= mod) me %= mod;     }     Hash operator+(Hash to) {       to.me += me;       if (to.me >= to.mod) to.me -= to.mod;       return to;     }     Hash operator-(Hash to) {       to.me -= me;       to.me *= -1;       if (to.me < 0) to.me += to.mod;       return to;     }     Hash operator*(Hash to) {       to.me *= me;       to.me %= to.mod;       return to;     }     Hash& operator+=(Hash to) {       me += to.me;       if (me >= mod) me -= mod;       return *this;     }     Hash& operator-=(Hash to) {       me -= to.me;       if (me < 0) me += mod;       return *this;     }     Hash& operator*=(Hash to) {       me *= to.me;       me %= mod;       return *this;     }     bool operator==(Hash to) { return me == to.me; }     T operator*() { return me; }   };   }  // namespace Hashes   namespace someUsefull {   template <typename T1, typename T2>   inline void checkMin(T1& a, T2 b) {     if (a > b) a = b;   }   template <typename T1, typename T2>   inline void checkMax(T1& a, T2 b) {     if (a < b) a = b;   }   const int _popcount_size_ = 16;   char _bits_count_[1 << _popcount_size_];   inline void _build_bits_count_() {     for (int i = 1, j = 0; i < (1 << _popcount_size_); ++i) {       if (i & (1 << (j + 1))) ++j;       _bits_count_[i] = _bits_count_[i ^ (1 << j)] + 1;     }   }   template <typename T1 = int, typename T2 = int>   inline T1 popcnt(T2 x) {     T1 ans = 0;     while (x) {       ans += _bits_count_[x & (1 << _popcount_size_) - 1];       x >>= _popcount_size_;     }     return ans;   }   }  // namespace someUsefull   using namespace std;   using namespace Hashes;   using namespace someUsefull;   vector<vector<int>> gr;   vector<vector<pair<int, ll>>> hr;   set<pair<int, int>> br;   vector<int> tin, tout, cmp;   vector<int> was;   vector<ll> pr;   vector<ll> dp;   vector<ll> ans;   vector<int> cntST;   vector<int> isMe;   int TT;   int t = 0;   void dfs(int v, int p = -1) {     tin[v] = tout[v] = ++t;     was[v] = 1;     for (int to : gr[v]) {       if (to == p) continue;       if (was[to] == 1)         checkMin(tout[v], tin[to]);       else {         dfs(to, v);         checkMin(tout[v], tout[to]);         if (tout[to] > tin[v]) {           br.insert({v, to});           br.insert({to, v});         }       }     }   }   void dfs2(int v, int c) {     cmp[v] = c;     for (int to : gr[v])       if (!cmp[to] && br.count({v, to}) == 0) dfs2(to, c);   }   void dfs3(int v, int p = -1) {     cntST[v] = isMe[v];     for (pair<int, int> to : hr[v]) {       if (to.first == p) continue;       dfs3(to.first, v);       cntST[v] += cntST[to.first];     }   }   void dpC(int v, int p = -1) {     dp[v] += pr[v];     for (pair<int, int> to : hr[v]) {       if (to.first == p) continue;       dpC(to.first, v);       if (cntST[to.first] != 0 && cntST[to.first] != TT)         dp[v] += max(0ll, dp[to.first] - to.second);       else         dp[v] += dp[to.first];     }   }   void dpF(int v, int p = -1) {     ans[v] = dp[v];     for (pair<int, int> to : hr[v]) {       if (to.first == p) continue;       if (cntST[to.first] != 0 && cntST[to.first] != TT)         dp[v] -= max(0ll, dp[to.first] - to.second);       else         dp[v] -= dp[to.first];       cntST[v] -= cntST[to.first];       if (cntST[v] != 0 && cntST[v] != TT)         dp[to.first] += max(0ll, dp[v] - to.second);       else         dp[to.first] += dp[v];       cntST[to.first] += cntST[v];       dpF(to.first, v);       if (cntST[v] != 0 && cntST[v] != TT)         dp[to.first] -= max(0ll, dp[v] - to.second);       else         dp[to.first] -= dp[v];       cntST[to.first] -= cntST[v];       if (cntST[to.first] != 0 && cntST[to.first] != TT)         dp[v] += max(0ll, dp[to.first] - to.second);       else         dp[v] += dp[to.first];       cntST[v] += cntST[to.first];     }   }   void solve(int test) {     int n, k, m;     cin >> n >> m >> k;     vector<int> inter(k);     vector<ll> cc(n);     vector<ll> w(m);     for (int i = 0; i < k; ++i) cin >> inter[i];     for (int i = 0; i < n; ++i) cin >> cc[i];     for (int i = 0; i < m; ++i) cin >> w[i];     vector<pair<int, int>> ed;     gr.resize(n);     for (int i = 0; i < m; ++i) {       int a, b;       cin >> a >> b;       --a;       --b;       ed.push_back({a, b});       gr[a].push_back(b);       gr[b].push_back(a);     }     tin.resize(n);     tout.resize(n);     cmp.resize(n);     was.resize(n);     dfs(0);     int c = 1;     for (int i = 0; i < n; ++i) {       if (cmp[i] == 0) {         dfs2(i, c);         c++;       }     }     for (int i = 0; i < n; ++i) --cmp[i];     --c;     hr.resize(c);     pr.resize(c);     dp.resize(c);     ans.resize(c);     cntST.resize(c);     isMe.resize(c);     for (int i : inter) isMe[cmp[i - 1]] = 1;     for (int i = 0; i < n; ++i) {       pr[cmp[i]] += cc[i];     }     for (int i = 0; i < m; ++i) {       if (br.count(ed[i])) {         hr[cmp[ed[i].first]].push_back({cmp[ed[i].second], w[i]});         hr[cmp[ed[i].second]].push_back({cmp[ed[i].first], w[i]});       }     }     dfs3(0);     TT = cntST[0];     dpC(0);     0;     ;     dpF(0);     for (int i = 0; i < n; ++i) {       cout << ans[cmp[i]] <<    ;     }   }   signed main() {     ios_base::sync_with_stdio(false);     cout.tie(0);     cin.tie(0);     _build_bits_count_();     int t = 1;     for (int i = 0; i < t; ++i) {       solve(i + 1);     }     return 0;   }