{"raw_statement":[{"iden":"problem statement","content":"You are given an integer $N$ and a prime $P$.\nCount the number, modulo $P$, of undirected connected graphs $G$ of $N$ vertices numbered $1$ to $N$ that satisfy the following condition:\n\n*   There are no self-loops in $G$. Note that multiple edges are allowed.\n*   For all edges $(u,v)$ in $G$, if we delete $(u,v)$ from $G$, $G$ remains connected. In other words, $G$ is edge-biconnected.\n*   For all edges $(u,v)$ in $G$, if we delete $(u,v)$ from $G$, $G$ is no longer edge-biconnected.\n\nTwo graphs are considered different if and only if there exists a pair of distinct vertices $(u,v)$ such that the numbers of edges connecting $u$ and $v$ in the two graphs are different."},{"iden":"constraints","content":"*   $2 \\le N \\le 50$\n*   $10^9<P<1.01\\times 10^9$\n*   $P$ is prime.\n*   All input values are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $P$"},{"iden":"sample input 1","content":"2 1005976817"},{"iden":"sample output 1","content":"1"},{"iden":"sample input 2","content":"5 1000837403"},{"iden":"sample output 2","content":"372"},{"iden":"sample input 3","content":"10 1001160547"},{"iden":"sample output 3","content":"789846604"},{"iden":"sample input 4","content":"20 1006779551"},{"iden":"sample output 4","content":"888612770"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}