There are people, numbered from to . Each person's age is an integer between and , inclusive. Several people may have the same age.
Each person counts the people who are strictly younger than them and the people who are strictly older than them, then reports the smaller of these two counts. Person reports .
Find the number of possible assignments of ages consistent with all the reports, modulo .
Two assignments are different if at least one person's age is different. If no assignment is consistent with all the reports, the answer is .
Here, is the number of consistent age assignments modulo .