import java.io.File; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Random; import java.util.Scanner; class Main{ final long p = 998244353; long ans=1; void dfs(int v, int d, ArrayList[] g) { if (d > 0) ans = ans * d % p; for (int u : g[v]) { dfs(u, d + 1, g); } } void run() throws Exception { Scanner sc=new Scanner(System.in); PrintWriter pw=new PrintWriter(System.out); int N=sc.nextInt(); ArrayList[] g=new ArrayList[N]; for (int i=0;i(); for (int i=1;i