b,c,d=gets.split.map &:to_i p (c<2?b*d:b*c*~-c.pow(d,m=10**9+7)*(c-1).pow(m-2,m))%m