xay loves connected graphs
时间限制:C/C++/Rust/Pascal 3秒,其他语言6秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Xay has recently learned graph theory, and he wants to test his skills!
He found a complete graph consisting of n vertices, where the value of edge (u,v) is au,v .
Xay really likes the concept of connected graphs, so he calls a subset of edges nice, iff the vertices are connected using these edges.
Xay defines the value of a set of edges to be (product of edge values)*(size of set).
Xay wants to know the total value of all nice subsets. Of course he solved it in 0.00001s, but he still wants to challenge you to find the answer!

输入描述:

The first line contains one integer n().
Then n-1 lines follow.
The i-th line contains n-i+1 numbers, denoting ,respectively().

输出描述:

Output one integer indicating the answer modulo 998244353.
示例1

输入

复制
3
1 1
1

输出

复制
9

说明

There are 4 nice subsets:
(1,2)(1,3)
(1,2)(2,3)
(1,3)(2,3)
(1,2)(1,3)(2,3)
Their values are 2,2,2,3 respectively.