#include #include #include using namespace std; using ll = long long; #include int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll n,s,t,k; cin>>n>>s>>t>>k; s--;t--; vector x(n); for(int i = 0;i>x[i]; vector>> g(n); int m; cin>>m; for(int i = 0;i>a>>b>>y; a--;b--; g[a].push_back(make_pair(b,y)); } vector> dp(n,vector(k+1,1e18)); vector>> prev(n,vector>(k+1,make_pair(-1,-1))); dp[s][1] = x[s]; using dat = pair>; priority_queue,greater> que; que.push({x[s],{s,1}}); while(que.size()){ auto now = que.top(); que.pop(); int ni = now.second.first; int t = now.second.second; if(dp[ni][t]!=now.first) continue; for(auto itr:g[ni]){ int to = itr.first; ll cost = now.first + itr.second + x[to]; int nt = t + 1; if(nt>k) nt = k; if(dp[to][nt]<=cost) continue; dp[to][nt] = cost; prev[to][nt] = make_pair(ni,t); que.push({cost,{to,nt}}); } } if(dp[t][k]==1e18){ cout<<"Impossible\n"; return 0; } cout<<"Possible\n"; cout< ans; ll ni = t; ll p = k; ans.push_back(ni); while(true){ auto nxt = prev[ni][p]; if(nxt.first==-1) break; ni = nxt.first; p = nxt.second; ans.push_back(ni); } cout<