Uncle Eyad is a Linux creep and his friend Jaber has always begged him to switch to Windows and he finally did!! Eyad works for the uncleship company owned and managed by his boss Hosen the grand uncle, and he is in control of the company's database system. Hosen usually gives Eyad queries to the database, and Eyad usually responds to them and maintains the database easily using Linux, but not anymore!!
As a good friend of Eyad, he asked you to help him respond to Hosen's queries and maintain the database accordingly.
Initially, the database is empty, Hosen gives Eyad $$$Q$$$ uncly queries one by one, and the queries have $$$5$$$ different types as described in the following:
The first line contains a single integer number $$$Q$$$ $$$(1 \le Q \le 2 * 10^5)$$$. The following $$$Q$$$ lines contain the description of the queries in the previous format in the problem statement.
For each query of the $$$5$$$-th type, output the answer to it.
131 a 31 b 61 ab 51 ca 21 ac 101 aba 15 caba 3 62 25 caba 3 63 1 4 25 caba 3 64 6 6 55 caba 3 6
4 3 0 1