#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) begin(v),end(v) template inline bool chmax(A & a, const B & b) { if (a < b) { a = b; return true; } return false; } template inline bool chmin(A & a, const B & b) { if (a > b) { a = b; return true; } return false; } using ll = long long; using pii = pair; constexpr ll INF = 1ll<<30; constexpr ll longINF = 1ll<<60; constexpr ll MOD = 1000000007; constexpr bool debug = false; //---------------------------------// int main() { int N, S, T, K; cin >> N >> S >> T >> K; --S; --T; vector X(N); REP(i, N) scanf("%d", &X[i]); int M; cin >> M; vector> g(N); REP(i, M) { int a, b, y; scanf("%d %d %d", &a, &b, &y); --a; --b; g[a].emplace_back(b, y + X[a]); } vector dist(N, vector(K, longINF)); vector prv(N, vector(K, {-1, -1})); // r 回 (chmin(r, K - 1)) dist, vertex using tup = tuple; priority_queue, greater> pq; dist[S][0] = 0; pq.emplace(0, 0, S); while (!pq.empty()) { auto [k, d, u] = pq.top(); pq.pop(); if (dist[u][k] != d) continue; for (auto [v, l] : g[u]) { const int nk = min(k + 1, K - 1); const ll nd = d + l; if (chmin(dist[v][nk], nd)) { prv[v][nk] = {u, k}; pq.emplace(nk, nd, v); } } } if (dist[T][K - 1] == longINF) puts("Impossible"); else { puts("Possible"); cout << dist[T][K - 1] + X[T] << endl; int u = T, k = K - 1; vector ans; while (u != -1) { ans.emplace_back(u); auto [nu, nk] = prv[u][k]; u = nu; k = nk; } reverse(ALL(ans)); cout << ans.size() << endl; REP(i, ans.size()) printf("%d%c", ans[i] + 1, " \n"[i + 1 == ans.size()]); } }