from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline A,B,N = map(int,input().split()) ans = 1 mod = 10**9 + 7 ans = 1 for p in product([i for i in range(A,B+1)],repeat=N): p0 = p[0] for pp in p: p0 = math.gcd(pp,p0) ans = (ans*p0)%mod print(ans)