Minimum on the segment#11717

Minimum on the segment

1 second
128 megabytes
Medium

Write a program which manipulates a sequence A = \{a_0, a_1, ..., a_{n - 1}\} with the following operations:

Note that the initial values of a_i~(i = 0, 1, ..., n - 1) are 2^{31} - 1.

Input

The first line contains the number n~(1 \le n \le 10^5) of elements in and the number q~(1 \le q \le 10^5) of queries.

Then, the -th query is given in one of the following formats:

The first digit represents the type of the query: denotes update(s,t,x) and denotes find(s,t). It is known that 0 \le s \le t < n, 0 \le x < 2^{31} - 1.

Output

For each operation, print the minimum value on a separate line.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading