Question There is string s1s2 sN with length To this string suppose we

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Question
There is a string S=s1s2…sN with length N. To this string, suppose we are going to perform the following operation (“Rotation” in the rest of this question), M times with a given order.
The following 3 integers will be given: L, R, K(1≦L≦R≦N, 1≦K≦100). We will rotate the substring sLsL+1…sR−1sR in this string to the right for K letters. Specifically, we will rearrange the part of the string which is aligned as sLsL+1…sR−1sR to sRsLsL+1…sR−1 K times. This will not change the arrangement of the characters that are not included to the interval.
You will be given M Rotations. Output the string that you will get after applying them to the string S.
Input
Input will be given in the following format from Standard Input:
N
S
M
L1 R1 K1
L2 R2 K2
:
LM RM KM
To the 1st line, integer N(1≦N≦100), which represents the length of the string, will be given.
To the 2nd line, the string S (length of S equals N) will be given. S consist only lowercase letters (a-z).
To the 3rd line, integer M(1≦M≦100), which represents the number of times of rotation, will be given.
On M lines after 4th line, the information of these series of rotation will be given. To ith line among them, 3 integers Li, Ri, Ki(1≦Li≦Ri≦N, 1≦Ki≦100), which represents L, R, K on rotation that will take place on for the ith time.
Output
Output the result obtained after applying the M rotations to the string S.
Make sure to insert a line break at the end of the output.
Input Example #1
5
abcde
2
2 4 1
1 5 2
Output Example #1
ceadb
After the first operation, the string will be adbce. Then, after the second operation, the string will be ceadb.
Input Example #2
10
okbfkkvdis
20
7 10 63
8 8 7
7 10 58
4 10 26
3 5 75
3 4 60
6 9 21
1 10 15
3 3 81
7 10 20
7 8 37
2 3 34
3 9 8
2 2 63
6 10 1
1 8 95
5 7 94
3 4 27
5 7 32
4 7 60
Output Example #2
vkidskofbk