First to Solve

아직 제출이 없습니다시간 제한5초메모리 제한512 MB

문제

The famous Forcedeltas Programming Contest features nn contestants, mm problems, and lasts for kk minutes.

For each contestant ii and each problem jj, an integer a_i,ja\_{i, j} is known. If a_i,j=0a\_{i, j} = 0, it means that contestant ii can not solve problem jj. Otherwise, it means that contestant ii can solve problem jj in exactly a_i,ja\_{i, j} minutes.

All contestants will follow the same strategy. Specifically, each contestant will form a list of all problems they can solve, shuffle the list uniformly at random, and solve the problems in that order, until the list ends or the contest is over.

For example, if the list for contestant ii looks like j_1,j_2,j\_1, j\_2, \ldots after shuffling, then they will solve problem j_1j\_1 at minute a_i,j_1a\_{i, j\_1}, problem j_2j\_2 at minute a_i,j_1+a_i,j_2a\_{i, j\_1} + a\_{i, j\_2}, and so on. Note that no problem can be solved at minute k+1k + 1 or later.

We'll say that contestant ii gets the First to Solve award for problem jj if no other contestant solves problem jj strictly earlier. In particular, it means that multiple contestants can get the award for the same problem.

Find the expected number of awards each contestant will get, modulo 998,244,353998\\,244\\,353 (see the Output section for details).

입력

The first line contains three integers nn, mm, and kk --- the number of contestants, the number of problems, and the length of the contest in minutes (1n5001 \le n \le 500; 1m261 \le m \le 26; 1k3001 \le k \le 300).

The ii-th of the following nn lines contains mm integers a_i,1,a_i,2,,a_i,ma\_{i, 1}, a\_{i, 2}, \ldots, a\_{i, m} (0a_i,jk0 \le a\_{i, j} \le k). The jj-th of these integers denotes the number of minutes required for contestant ii to solve problem jj, or 00 if contestant ii can not solve problem jj.

출력

Print nn integers --- the expected number of awards contestants 1,2,,n1, 2, \ldots, n will get, modulo 998,244,353998\\,244\\,353.

Formally, let M=998,244,353M = 998\\,244\\,353. It can be shown that the expected number of awards can be expressed as an irreducible fraction pq\frac{p}{q}, where pp and qq are integers and q≢0(modM)q \not \equiv 0 \pmod{M}. Print the integer equal to pq1modMp \cdot q^{-1} \bmod M. In other words, print such an integer xx that 0x<M0 \le x < M and xqp(modM)x \cdot q \equiv p \pmod{M}.

힌트

In the example test, contestant 11 will always get the award for problem 11, contestant 22 will always get the award for problem 22, the expected number of awards contestant 33 will get is 34\frac{3}{4}, contestant 44 will never get any awards, and the expected number of awards contestant 55 will get is 12\frac{1}{2}.