[ecause f(x)=e^{g(x)}\
herefore ln(f(x))=g(x)\
hereforefrac{f'(x)}{f(x)}=g'(x)\
herefore xf'(x)=xf(x)g'(x)\
herefore nf_n=sumlimits_{i=1}^nif_{n-i}g_i\
f_n=frac{sumlimits_{i=1}^nif_{n-i}g_i}n\
g_n=f_n-frac {sumlimits_{i=1}^{n-1}if_{n-i}g_i}n
]
inline void ln(int *f,int *g,int n){
g[0]=0;
for(int i=1;i<n;++i)
{
g[i]=0;
for(int j=1;j<i;++j)g[i]=(g[i]+1ll*f[i-j]*g[j]%P*j)%P;
g[i]=(f[i]+1ll*g[i]*(P-inv[i]))%P;
}
}
inline void exp(int *f,int *g,int n){
g[0]=1;
for(int i=1;i<n;++i){
g[i]=0;
for(int j=1;j<=i;++j)g[i]=(g[i]+1ll*g[i-j]*f[j]%P*j)%P;
g[i]=(1ll*g[i]*inv[i])%P;
}
}