Bobo has a n digits decimal number

(It may have leading zeros).
Let R(i, j) denotes number D with digits between the i-th position and j-th position reversed. That is,
%20%3D%20d_1%5Cdots%20d_%7Bi%20-%201%7D%20d_jd_%7Bj%20-%201%7D%5Cdots%20d_i%20d_%7Bj%20%2B%201%7Dd_%7Bj%20%2B%202%7D%5Cdots%20d_n)
.
Bobo would like to find
)
modulo
)
.
输入描述:
The input contains at most 30 sets. For each set:
The first line contains an integer n (
).
The second line contains n digits
.
输出描述:
For each set, an integer denotes the result