Under construction

Still being built. Things may change

Counting Cases

Time limit1sMemory limit1024 MB

Summary
Given N rabbits that each pick a value from the set X, count the assignments whose product equals k for every k from 1 to K, modulo 1e9+7.
Level

Hard8 of 10

Topics
Number theory, Dynamic programming, Combinatorics, Math
Solved
No attempts yet

Problem

The rabbit kingdom has NN rabbits, numbered from 11 to NN. Rabbits like integers. The integer that rabbit ii likes most is rir_i. Rabbits do not reveal their favorite integers. Two different rabbits may have the same favorite integer.

A bear that infiltrated the rabbit kingdom found out that rabbits like only the integers in the set X={x1,x2,⋯ ,xM}X=\{x_1,x_2,\cdots ,x_M\}. For every ii, the favorite integer rir_i of rabbit ii is one of the MM integers in XX.

The potential of the rabbit kingdom is ∏i=1Nri\prod_{i=1}^{N}{r_i}. For each integer kk with 1≤k≤K1\le k\le K, the bear wants to count the cases in which the potential of the rabbit kingdom is kk. Two cases are different if the favorite integer rir_i of some rabbit ii is different.

Let f(k)f(k) be the number of cases in which the potential of the rabbit kingdom is kk. Find f(1),f(2),⋯ ,f(K)f(1), f(2), \cdots, f(K).

Input

The first line contains NN, MM, and KK, separated by spaces. (1≤N≤109;(1\le N\le 10^9; 1≤M,K≤2×105)1\le M,K\le 2\times 10^5)

The second line contains x1,x2,⋯ ,xMx_1, x_2, \cdots, x_M, separated by spaces. (1≤xi≤109;(1\le x_i\le 10^9; xi<xi+1)x_i<x_{i+1})

All numbers in the input are integers.

Output

On the first line, print f(1),f(2),⋯ ,f(K)(mod1 000 000 007)f(1), f(2), \cdots, f(K) \pmod{1\,000\,000\,007}, separated by spaces.

Examples3

  1. Example 1

    Input
    2 3 5
    1 2 3
    
    Expected output
    1 2 2 1 0
    
  2. Example 2

    Input
    2 2 6
    2 3
    
    Expected output
    0 0 0 1 0 2
    
  3. Example 3

    Input
    100 5 6
    1 2 3 5 6
    
    Expected output
    1 100 100 4950 100 10000