You are provided with an array of size that contains integers and two additional integers and . You have defined the following functions:
Note: This expression represents that the element of is the prefix sum of the first elements of , where .
Your task is to determine integers, where the integer is the element of .
As these numbers can be large, print them as modulo .
Input format
Output format
Print space-separated integers, where the integer denotes the element of . As these numbers can be large, you are required to print them as modulo .
Constraints
, .
,
,