#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) #define Inf 1000000001 vector> E; mint dp[100005][2]; void dfs(int cur){ dp[cur][0] = 1; //cout<>n; E.resize(n); rep(i,n-1){ int p; cin>>p; p--; E[p].push_back(i+1); } dfs(0); /* rep(i,4){ cout<