package main import . "fmt" import . "math/big" func main() { a:=new(Int) b:=new(Int) c:=new(Int) k:=new(Int) Scan(a,b,c,k) x:=NewInt(2) m:=NewInt(1e9+7) u:=NewInt(1) u.Sub(m,u) x.Exp(x,k,u) a.Mul(a,b).Mod(a,m).Mul(a,c).Mod(a,m) a.Exp(a,x,m) Println(a) }