Define the palindrome value of a string

as the number of non-empty strings

such that:
-
is a palindrome, that is, it reads the same forwards and backwards.
-
is a contiguous substring of
.
For example, if

is "

", then string

can be "

", "

", or "

", so the palindrome value of

is

.
Find the sum of palindrome values of all strings with length

and character set size

. Since the answer may be too large, output it modulo

.
输入描述:
The first line contains two integers
(
), denoting the length of the string and the character set size.
输出描述:
Output a single integer, representing the answer, modulo
.