Implement an efficient data structure to keep a dynamic array A[0..] of strings, with two operations:
Input
Input consists of just one case. Assume that each s has between 1 and 10 lowercase letters, each i is between 0 and the current number of strings, and each j is between 0 and the current number of characters minus one. The total number of operations is at most 3 · 105. An ‘E’ marks the end of the input.
Output
Print a line with the letter at the j-th position for each ‘C’ operation.
Input
I hello 0 C 0 C 4 I bye 0 C 0 C 7 I hi 1 C 4 C 1 C 9 E
Output
hoboiyo