Problem H. Desert

时间限制 12000 ms   内存限制 256 MB

Tom and Jerry got lost in a desert. But they are not bored or afraid at all, because they found a truly interesting thing to do: researching the varied kinds of kakti in the desert!
After careful observations, they found that a kaktus can be seen as a graph consisting of several nodes. To be precise, an $n$-node kaktus is an undirected connected graph that has only $1$ node as the root, in which every edge belongs to exactly one simple cycle and all nodes are unlabelled. You can refer to sample case for a better understanding.
Finding something new is always exciting, but it brings them new doubts.
"How many different kinds of $n$-node kakti are there?" wondered Tom.
"Your problem is simpler than mine. I am wondering how many different kinds of $1,2,3,..,n$-node kakti there are." said Jerry.
 

输入数据

One line containing a number $n$ ($1 \leq n \leq 10^5$).
 

输出数据

$n$ lines, each line containing a number, the number of $n$-node kakti.

As these numbers can be very large, output them modulo $998244353$.
 

样例输入

样例输出

复制
1
1
3
8

样例说明

 Here are the 8 4-node kakti. 

 
  
 
 

提交

请先 登录

© 2025 FAQs Contact About