#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <class T> using treap = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define int long long
#define REP(i, n) for (long long i = 0, max_i = (n); i < max_i; i++)
#define REPI(i, a, b) for (long long i = (a), max_i = (b); i < max_i; i++)
#define ALL(obj) begin(obj), end(obj)
#define RALL(obj) rbegin(obj), rend(obj)
#define fi first
#define se second
using ii = pair<int, int>;
vector<ii> dirs = {
  {1, 0}, {0, 1}, {-1, 0}, {0, -1},  // 4方向
  {1, 1}, {-1, 1}, {-1, -1}, {1, -1},  // 斜め
  {0, 0},  // 自身
};
template <class T> inline bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } return false; }
template <class T> inline bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; } return false; }
template <class T, class S> vector<T> make_vec(size_t n, S x) { return vector<T>(n, x); }
template <class T, class... Ts> auto make_vec(size_t n, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(n, make_vec<T>(ts...)); }

// debug
template <class T> ostream& operator<<(ostream& s, vector<T>& d) { REP (i, d.size()) s << d[i] << (i == d.size() - 1 ? "" : " "); return s; }
template <class T> ostream& operator<<(ostream& s, vector<vector<T>>& d) { REP (i, d.size()) s << d[i] << (i == d.size() - 1 ? "" : "\n"); return s; }
template <class T, class S> ostream& operator<<(ostream& s, pair<T, S>& p) { s << "{" << p.first << ", " << p.second << "}"; return s; }
template <class T, class S> ostream& operator<<(ostream& s, map<T, S> m) { for (auto it = m.begin(); it != m.end(); it++) { s << *it << (next(it) == m.end() ? "" : "\n"); } return s; }
template <class T, class S> ostream& operator<<(ostream& s, unordered_map<T, S> m) { for (auto it = m.begin(); it != m.end(); it++) { s << *it << (next(it) == m.end() ? "" : "\n"); } return s; }
#ifdef _MY_DEBUG
  #define dump(...) cerr << "/* " << #__VA_ARGS__ << " :[" << __LINE__ << ":" << __FUNCTION__ << "]" << endl, dump_func(__VA_ARGS__), cerr << "*/\n\n";
#else
  #define dump(...)
  #define endl "\n"
#endif
void dump_func() { cerr << endl; }
template <class Head, class... Tail> void dump_func(Head&& h, Tail&&... t) { cerr << h << (sizeof...(Tail) == 0 ? "" : ", "), dump_func(forward<Tail>(t)...); }

struct Fast { Fast() { cin.tie(0); ios::sync_with_stdio(false); } } fast;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
constexpr int MOD = 1000000007;
// *************** TEMPLATE END *************** 

struct Edge { int to, cost; };
class UndirectedGraph {
public:
  vector<vector<Edge>> G;
  int V;
  UndirectedGraph(int V) : G(V), V(V) {}
  void add_edge(int u, int v, int cost) {
    G[u].push_back({v, cost});
    G[v].push_back({u, cost});
  }
  vector<int> dijkstra(int s) {
    vector<int> d(V, 1e18); d[s] = 0;
    priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> que; // {dist, v}
    que.push({0, s});
    while (!que.empty()) {
      pair<int, int> p = que.top(); que.pop();
      int v = p.second;
      if (d[v] < p.first) continue;  // 定数倍枝刈り
      for (Edge e: G[v]) {
        int tmp = d[v] + e.cost;
        if (d[e.to] <= tmp) continue;
        d[e.to] = tmp;
        que.push({tmp, e.to});
      }
    }
    return d;
  }
};

const int INF = 1e18;
signed main() {
  int n, m, K; cin >> n >> m >> K;
  vector<int> P(n); REP (i, n) cin >> P[i];
  vector<int> c(n); REP (i, n) cin >> c[i], c[i]--;
  vector<int> J(n); REP (i, n) cin >> J[i];
  UndirectedGraph g(n);
  REP (i, m) {
    int u, v, t; cin >> u >> v >> t;
    u--; v--;
    g.add_edge(u, v, t);
  }
  auto gam = g.dijkstra(0);

  priority_queue<ii, vector<ii>, greater<ii>> q;
  vector<int> d(n, INF);
  REP (i, n) {
    d[i] = gam[i] - P[i];
    q.push({d[i], i});
  }
  while (!q.empty()) {
    ii p = q.top(); q.pop();
    int v = p.second;
    if (d[v] < p.first) continue;  // 定数倍枝刈り
    for (Edge e: g.G[v]) {
      int tmp = d[v] + e.cost;
      if (d[e.to] <= tmp) continue;
      d[e.to] = tmp;
      q.push({tmp, e.to});
    }
  }

  vector<int> ans(K, INF);
  REP (i, n) {
    chmin(ans[c[i]], d[i] + gam[i] - J[i]);
  }
  REP (i, K) {
    cout << -ans[i] << endl;
  }
}



Measured memory_bytes: 22128