Now it's time after math class!
The teacher taught Baby Volcano what can do with polynomials and how to use polynomials.The teacher said that a polynomial of degree $n$ can be written as $f(x)=\sum \limits_{i=0}^{n} a_i x^i$. Also,you can regard it as a function,and replace $x$ with some number $a$ in order to get a special value called $f(a)$
Today's math homework is to calculate $f(a)$ of a polynomial of degree $n$,$f(x)$.Because the answer is extremely large,Baby Volcano is only asked to write $f(x) \bmod p$ on the paper,where $p$ is a prime number.
Baby Volcano writes number $f(0) \bmod p,f(1) \bmod p,\cdots,f(n) \bmod p$ on a textbook quickly. After a while,however,he lost $f(x)$ and can't continue with his homework.
Baby Volcano want to find $f(x)$,But he is too small to solve it.Baby Volcano needs your help!