Given $$$n$$$ $$$n$$$-digit numbers (there may be leading zeros).
For each $$$i$$$ in increasing order ($$$1 \le i \le n$$$), you must choose $$$j \neq i$$$ and perform the following operation:
Find the minimum sum of all $$$n$$$ numbers modulo $$$998244353$$$ after performing all the operations (you need to find the minimum sum first, then print it modulo $$$998244353$$$).
The first line consists of one integer $$$n \:(2 \le n \le 700)$$$.
The following $$$n$$$ lines consist of the numbers $$$a_i$$$ (where $$$a_i$$$ has exactly $$$n$$$ digits).
The only line consists of one integer, which is the minimum sum modulo $$$998244353$$$ after performing all the operations.
43142531003413423
1364
3032102999
306