Codeforces Round 225 (Div. 1)
E
Vowels
Codeforces
2700
原题
← D→
翻译中…

Iahubina is tired of so many complicated languages, so she decided to invent a new, simple language. She already made a dictionary consisting of $*n*$ 3-words. A 3-word is a sequence of exactly $3$ lowercase letters of the first 24 letters of the English alphabet ($*a*$ to $*x*$). She decided that some of the letters are vowels, and all the others are consonants. The whole language is based on a simple rule: any word that contains at least one vowel is correct.

翻译中…

Iahubina forgot which letters are the vowels, and wants to find some possible correct sets of vowels. She asks Iahub questions. In each question, she will give Iahub a set of letters considered vowels (in this question). For each question she wants to know how many words of the dictionary are correct, considering the given set of vowels.

翻译中…

Iahubina wants to know the $*xor*$ of the squared answers to all the possible questions. There are $2^{24}$ different questions, they are all subsets of the set of the first 24 letters of the English alphabet. Help Iahub find that number.

翻译中…

Input

翻译中…

The first line contains one integer, $*n*$ $(1 ≤ *n* ≤ 10^{4})$. Each of the next $*n*$ lines contains a 3-word consisting of $3$ lowercase letters. There will be no two identical 3-words.

翻译中…

Output

翻译中…

Print one number, the $*xor*$ of the squared answers to the queries.

翻译中…

样例

Input #1
5
abc
aaa
ada
bcd
def
Output #1
0
InputCopy OutputCopy
题目信息
题号
383E
时间限制
4 s
内存限制
256 MB
标签
组合数学
分治
动态规划

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。