a,b,n=gets.split.map &:to_i p [*a..b].repeated_permutation(n).inject(1){_1*=_2.inject :gcd}%(10**9+7)