: Queries the value of the substring from the
-th to the
-th character. The substring is guaranteed to be a valid expression.
: Modifies the
-th character of the original expression to
. It is guaranteed that the modified expression
remains valid.
It contains only the digits 0-9 and the operators + and *.
No two operators are adjacent.
Operators do not appear at the beginning or end of the expression.
Please note that under this definition, numbers may have leading zeros.
The first line contains an integer(
), representing the number of operations.
The second line contains a string(
,
).
The nextlines each contain an operation. The first number of each line is
, representing the type of operation:
If , it is followed by two integers
and
(
), representing a query.
If , it is followed by an integer
and a character
(
,
), representing a modification.
It is guaranteed that all query strings and the string at any time are valid expressions.
For each query operation, output a single integer representing the result modulo
.