#include using namespace std; /*void initialize(string s) { // This function is called once before all queries. }*/ long int multiplyNumbers(int n,vector& b) { long max1=1000000007; if (b[n-1]==0) { return n*multiplyNumbers(n-1,b); } else { return ((n*b[n-1])%max1); } } long int answerQuery(string s,int l, int r,vector& b) { // Return the answer for this query modulo 1000000007. vectora(100,0); int counteven=0; int countodd=0; for(int i=l;i> s; // initialize(s); vectorb(1000000,0); b[0]=1; b[1]=1; b[2]=2; int q; cin >> q; for(int a0 = 0; a0 < q; a0++){ int l; int r; cin >> l >> r; l--; r--; int result = answerQuery(s,l,r,b); cout << result << endl; } return 0; }