#include using namespace std; int main(){ int n,m,k;cin>>n>>m>>k; vector x(k);for(auto&e:x)cin>>e,e--; vector> g(n); for(int i=0;i>u>>v; u--;v--; g[u].push_back(v); g[v].push_back(u); } vector f(n,vector(n,1)); for(auto&&e:x){ vector dp(n); dp[e]=1; for(int i=0;i f2(n); for(int p=0;p ndp(n); for(int p=0;p