Followers of I 3

No attempts yetTime limit3sMemory limit256 MB

Problem

Hyeonjong joined the church of II, which holds the number II sacred. The church treats II itself, and every other number that arithmetic on II can produce, as a good number. To make many good numbers, Hyeonjong prepared the following game.

He needs two things.

  • AA cards with 'I' drawn on both sides, BB cards with '+', and CC cards with '×'.
  • A stack that already holds infinitely many copies of II.

Hyeonjong shuffles the cards, draws them one at a time in the shuffled order, and acts on each card he draws.

  • 'I' card: push II onto the stack.
  • '+' card: pop the top two numbers of the stack, then push their sum.
  • '×' card: pop the top two numbers of the stack, then push their product.

The stack always holds infinitely many numbers, so every draw order runs to the end.

Once every card is drawn, the number on top of the stack is a good number, and so is every number below it. Hyeonjong therefore wants, over all possible card arrangements, the sum of the topmost numbers, the sum of the second numbers from the top, and so on down to the sum of the KK-th numbers from the top.

Cards drawn with the same symbol are not distinguished. An arrangement is one distinct sequence of A+B+CA+B+C symbols, and each arrangement is counted exactly once.

Input

The first line contains five integers II, AA, BB, CC, and KK, separated by spaces. II is the sacred number, AA is the number of cards with 'I', BB is the number of cards with '+', CC is the number of cards with '×', and KK is how many sums to report.

  • 1I1091 \le I \le 10^9
  • 0A,B,C400 \le A, B, C \le 40
  • 1K401 \le K \le 40

Output

Print KK lines. On line ii, print the sum, over all possible card arrangements, of the number that sits ii-th from the top of the stack once every card is drawn. The sum can be very large, so print it modulo 10000000071\,000\,000\,007.