{ int @t; rep(t){ ll @n; Mint @ag,@bg,@ac,@bc,@ap,@bp; ag/=bg; ac/=bc; ap/=bp; wt(1-(ag+ac)**n-(ag+ap)**n-(ac+ap)**n+2*(ag**n+ac**n+ap**n)); } }