#include using namespace std; typedef long long Int; #define MOD 1000000007 Int P[100005]; Int modexp(Int a,Int b) { Int ans=1; while (b) { if (b%2) ans=ans*a%MOD; b/=2; a=a*a%MOD; } return ans; } int main() { Int N,Q,a,b,B; cin>>N>>a>>b>>Q; B=modexp(b,MOD-2); for (Int i=0;i>P[i]; while (Q--) { Int type; cin>>type; if (type==1) { Int idx,xx; cin>>idx>>xx; P[idx]=xx; } else { Int l,r; cin>>l>>r; Int dprev=0; for (Int i=l;i