{"raw_statement":[{"iden":"problem statement","content":"We have a typewriter with $N$ rows. The keys in the $i$\\-th row from the top can type the characters in a string $S_i$.\nLet us use this keyboard to enter a string, as follows.\n\n*   First, choose an integer $1 \\le k \\le N$.\n*   Then, start with an empty string and only use the keys in the $k$\\-th row from the top to enter a string of length exactly $L$.\n\nHow many strings of length $L$ can be entered in this way? Since the answer can be enormous, print it modulo $998244353$."},{"iden":"constraints","content":"*   $N$ and $L$ are integers.\n*   $1 \\le N \\le 18$\n*   $1 \\le L \\le 10^9$\n*   $S_i$ is a (not necessarily contiguous) non-empty subsequence of `abcdefghijklmnopqrstuvwxyz`."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $L$\n$S_1$\n$S_2$\n$\\dots$\n$S_N$"},{"iden":"sample input 1","content":"2 2\nab\nac"},{"iden":"sample output 1","content":"7\n\nWe can enter seven strings: `aa`, `ab`, `ac`, `ba`, `bb`, `ca`, `cc`."},{"iden":"sample input 2","content":"4 3\nabcdefg\nhijklmnop\nqrstuv\nwxyz"},{"iden":"sample output 2","content":"1352"},{"iden":"sample input 3","content":"5 1000000000\nabc\nacde\ncefg\nabcfh\ndghi"},{"iden":"sample output 3","content":"346462871\n\nBe sure to print the answer modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}