i want u to act as the most skilled competetive programmer, u take time to think and check if ur solution works and match up with the example tescase, u need to think thoroughly since u r in a contest.
use need to use this template, make sure u have lowercase rlly short variable names and NO COMMENTS (in the code, at all) and since ur using this template always use int and not long long, PLS REVALUATE UR CODE AND MAKE SURE IT MAKES SURE IT MATCHES EVERY SINGLE SAMPLE INPUT AND OUTPUT GIVEN, THINK MULTIPLE TIMES BEFORE GIVING UR FINAL ANSWER AS THIS IS A CONTEST:
#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main()
{
    cin.tie(0);
    ios_base::sync_with_stdio(false);
}


Problem Description
Thomas has
N
Nobjects and
M
Mbaskets in the room. Each object is represented by a capital letter of the alphabet, from
TO
TOto
Z
ZThe baskets are numbered by
0
0to
M
−
1
M−1. Each basket has an unlimited capacity and there is an order among the elements inside it: the element in position
0
0it's on the bottom, the one in position
1
1it is located immediately above, and so on.

"Some of Thomas's baskets"

Initially, all items are in order in the basket.
0
0, and their order is given by a string
S
Sin length
N
N. The first character of
S
Srepresents the object in position
0
0, and so on. However, when he is bored, Tom spends his time moving objects between baskets! In particular, he moves the object from the top of one basket to the top of another basket.

Help Thomas keep track of the objects in his room, always being ready to tell him which object is in a certain position in a certain basket, managing his
Q
Qmovements and questions.

Input data
The first line of the input file contains an integer
T
T, the number of test cases. The following
T
Ttest cases, numbered by
1
1to
T
TEach test case is preceded by a blank line.

Each test case is composed as follows:

the first line contains the integers
N
N,
M
MAnd
Q
Q;
the second line contains the string
S
S;
the
Q
QThe next lines contain the description of a move or control:
s 
to
to 
b
bindicates a move: the item on top of the basket
to
toit has been moved to the top of the bin
b
b(it is guaranteed that the basket
to
tocontains at least one object at the time of the move);
c 
to
to 
b
bindicates a control: Thomas wants to know what the
b
b-th item from the bottom in the trash
to
to(it is guaranteed that the basket
to
tocontains at least
b
+
1
b+1objects at the time of inspection).
Output data
The output file should contain the answer to the test cases that you have solved. For each test case that you have solved, the output file should contain a line that says:

Case #t: ans ...
where tis the test case number (starting from
1
1) and ansis a string representing Thomas's responses to the controls. The
the
theThe -th character of the string is an uppercase letter that represents the answer to the
the
the-th check.

Hiring
T
=
10
T=10, in the input files you will download will be present exactly
10
10test cases.
2
≤
N
≤
300
 
000
2≤N≤300000.
2
≤
M
≤
500
 
000
2≤M≤500000.
1
≤
Q
≤
300
 
000
1≤Q≤300000.
The string
S
Shas length
N
Nand is made up of uppercase letters of the English alphabet.
0
≤
to
,
 
b
<
M
0≤to ,b<M,
to
≠
b
to

=bfor every move.
For every move, there is at least one item in the basket
to
to.
0
≤
to
<
M
0≤to<M,
0
≤
b
<
N
0≤b<Nfor each check.
For each control, the basket
to
tocontains at least
b
+
1
b+1objects.
Input/Output Examples
Input:

2

3 3 2
ABC
s 0 1
c 1 0

4 3 6
BCBA
s 0 1
c 1 0
s 0 2
s 1 2
c 2 1
c 0 0
Output:

Case #1: C
Case #2: AAB