{"trustable":true,"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":"\u003cdiv class\u003d\"panel_content\"\u003eAlice and Bob is now playing a game about strings.\u003cbr\u003eThere is a dictionary containing $n$ words (words might be same). Alice choose a lowercase English letter arbitrarily first, but this letter should appear in at least one of these $n$ words. Then Bob choose a lowercase English letter arbitrarily to add it before or after the letter Alice chose. So Bob gets a new string now. This new string should also be a substring (consecutive subsequence) of at least one strings in the dictionary. After that, it\u0027s Alice\u0027s turn. Alice should do the same thing, choosing a letter and add it before or after the current string, making a new string. At every moment, the string they made should always be a substring of at least one strings in the dictionary. The player who can\u0027t operate first lose the game and the other one win.\u003cbr\u003eBesides, each player has a score. The score is calculated by the following rule:\u003cbr\u003eIf the string $S$ is now made, the current player will get $score(S)$ points. It means that Alice will score in the first round, then Bob, then Alice...\u003cbr\u003e\\begin{eqnarray*}\u003cbr\u003escore(S)\u003d\\left[\\left(\\sum_{i\u003d1}^{|S|}value(S_i)\\right)\\times\\max_{i\u003d1}^{|S|}value(S_i)\\right]+occ(S)\u003cbr\u003e\\end{eqnarray*}\u003cbr\u003ewhere\u003cbr\u003e\u003cbr\u003e 1. $|S|$ means the length of $S$.\u003cbr\u003e 2. $value(c)$ represents the value of letter $c$. The score of letter ``a\u0027\u0027 is 1, ``b\u0027\u0027 is 2, ..., ``z\u0027\u0027 is 26.\u003cbr\u003e 3. $occ(S)$ means the time that $S$ occurs as a substring in the dictionary, each word is counted just once.\u003cbr\u003e\u003cbr\u003eAlice and Bob will play with best strategy. That is to say, they will consider to win first and then maximize their score, after that they will consider to minimize the score of others.\u003cbr\u003ePlease determine who will win the game, and report the final scores they will earn during the whole game.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input contains several test cases, no more than 10 test cases.\u003cbr\u003eIn each test case, the first line contains an integer $n(1\\leq n\\leq 30)$, denoting the number of words in the dictionary.\u003cbr\u003eIn the next $n$ lines, each line contains a non-empty string $word_i$, denoting a word in the dictionary. The string is composed of lowercase English letters and its length will not exceed 30."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output a string in the first line. If Alice will win ,output \u0027\u0027Alice\u0027\u0027, otherwise output \u0027\u0027Bob\u0027\u0027.\u003cbr\u003eThen print two integers $A$ and $B$ in second line, denoting the final score of Alice and Bob.\u003cbr\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\r\naba\r\nabac\r\n3\r\nartem\r\nnik\r\nmax\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eBob\r\n29 35\r\nAlice\r\n2403 1882\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}