MOD = 10**9 + 7 C, N, M = map(int, input().split()) # Compute (1/C)^N mod MOD inv_C = pow(C, MOD-2, MOD) inv_C_pow_N = pow(inv_C, N, MOD) # Probability that a single bus is NOT at bus stop 1 after N steps prob_not = (1 - inv_C_pow_N) % MOD # Probability that all M buses are NOT at bus stop 1 prob_all_not = pow(prob_not, M, MOD) # Result is 1 - prob_all_not result = (1 - prob_all_not) % MOD print(result)