{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\nMemorizing words is always an important part of reviewing English. After three years of college life, Lele has finally begun to recite words.\n\u003cbr\u003eOne day, Lele saw a way to recite words based on their roots in a word book. For example, \"ab\", placed before the word generally means \"contrary, bad, leaving\" and so on.\n \u003cbr\u003eSo Lele wondered, if n roots were recited, would these roots appear in the word? A more precise description is: the length is not more than L, only composed of lowercase letters, and contains at least one root word, how many may there be? Here we don\u0027t consider whether the word has actual meaning.\n \u003cbr\u003e \n \u003cbr\u003eFor example, there are 2 roots aa and ab, there may be 104 words with a length of not more than 3, which are:\n \u003cbr\u003e(2) aa,ab, \n \u003cbr\u003e(26)aaa,aab,aac...aaz, \n \u003cbr\u003e(26)aba,abb,abc...abz, \n \u003cbr\u003e(25)baa,caa,daa...zaa, \n \u003cbr\u003e(25)bab,cab,dab...zab。 \n \u003cbr\u003e \n \u003cbr\u003eThis is just a small situation. For other complicated situations, Lele can\u0027t count them, so please help him now.\n \u003cbr\u003e \n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"This problem contains multiple sets of data, please process to the end of the file.\n\u003cbr\u003eEach dataset occupies two rows.\n\u003cbr\u003eThe first line has two positive integers n and L. (0 \u0026lt; n \u0026lt; 6,0 \u0026lt; L \u0026lt; 2^31)\n\u003cbr\u003eThere are n roots in the second line, each root consists only of lowercase letters and the length does not exceed 5. \n\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each dataset, please output the total number of possible words in one line.\n\u003cbr\u003eSince the result may be huge, you only need to output the value of the total number of words modulo 2^64.\n\u003cbr\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e2 3\naa ab\n1 2\na\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e104\n52\u003c/pre\u003e"}}]}