Poem Titles
In a recent referendum, the Smeshariki have amended the "Copyright Protection" law regarding "Poem Titles." Previously, the law required poem titles to be sequences of 0s and 1s. Now, each new poem title must not only consist of 0s and 1s but also must not contain the titles of any already published works.
Following the referendum, the Smeshariki published a list of existing poem titles on their website. With each new poem, they plan to update this list.
Upon learning about these legislative changes, Barash decided to name all his masterpieces using sequences of length K. He visited the Smeshariki website and found that there are already N works listed. Curious about how many more poems he could write without violating the new law, Barash began counting but soon realized it was too complex for him to manage. Help Barash determine how many poems he can write. Barash suspects the number might be very large, so he requests the result to be given modulo P.
Input
The first line contains three numbers: N, K (K ≤ 1000), and P (P ≤ 2*10^9). The following N lines list the titles, each a sequence of zeros and ones. The length of these titles does not exceed 15. It is known that before the law was amended, some poem titles might have been identical, but they were not removed from the list.
Output
Output the number of poems Barash can write, modulo P, without altering his rule about the length of titles and without violating the law.