#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N,M,K; cin >> N >> M >> K; vector A(K); for(auto &a : A) cin >> a,a--; vector> dist(N,vector(N)); for(auto &h : dist) for(auto &w : h) cin >> w; int n2 = 1<> dp(n2,vector(N,1e9)); for(int i=0; i