M=10**9+7;F=[1];P=[0] pow=->a,n=M-2{a.pow(n,M)} N,K=gets.split.map &:to_i 1.upto(K+1){|i|P<<(pow[i,K]+P[-1])%M;F<