Permutations strike back
Vasya initially wrote all the numbers from 1 to N on a board in a specific order, using each number exactly once. Occasionally, he erases a number and replaces it with another. The total number of numbers on the board is quite large, making it difficult for Vasya to view them all at once. To help visualize the sequence, he developed a program that can answer the following question at any moment: How many numbers in positions from x to y fall within the range from k to l?
Your task is to implement the same functionality.
Input
The first line contains two integers: N (1 ≤ N ≤ 100,000), the number of numbers Vasya initially wrote, and M (1 ≤ M ≤ 100,000), the total number of queries and changes Vasya makes. The second line lists N numbers, representing the sequence Vasya wrote. The following M lines describe the queries. Each change request starts with the word SET and follows the format SET a b (1 ≤ a ≤ N, 1 ≤ b ≤ N), indicating that Vasya replaced the number at position a with the number b. Each query starts with the word GET and follows the format GET x y k l (1 ≤ x ≤ y ≤ N, 1 ≤ k ≤ l ≤ N).
Output
For each query from Vasya, output a single number, which is the answer to the query.