CF862F Mahmoud and Ehab and the final stage
Description
Mahmoud and Ehab solved Dr. Evil's questions so he gave them the password of the door of the evil land. When they tried to open the door using it, the door gave them a final question to solve before they leave (yes, the door is digital, Dr. Evil is modern). If they don't solve it, all the work will be useless and they won't leave the evil land forever. Will you help them?
Mahmoud and Ehab are given $ n $ strings $ s_{1},s_{2},...\ ,s_{n} $ numbered from $ 1 $ to $ n $ and $ q $ queries, Each query has one of the following forms:
- $ 1 $ $ a $ $ b $ $ (1
Input Format
The first line of input contains 2 integers $ n $ and $ q $ $ (1
Output Format
For each query of first type output its answer in a new line.