Have you ever wondered how many people trams transport annually in a city with a population of ten million, where every third resident uses the tram twice a day?
Suppose there are cities on planet Earth that have tram systems. Statistics enthusiasts have calculated, for each of these cities, how many people were transported by trams over the past year. Based on this data, a table was created in which the cities were initially sorted alphabetically. Later, it turned out that the city names were not relevant for the statistical analysis, so they were simply replaced with numbers from to .
The search system that works with this data needs to quickly answer the following type of query: is there a city among those numbered from to where exactly people were transported by trams over the year?
You are to implement this query module.
The first line contains a single integer n~(0 < n < 70000) — the number of cities.
The second line contains positive integers — the statistical data, where the -th number indicates the number of people transported by trams in the -th city over the past year. All values are positive integers and do not exceed 10^9 - 1.
The third line contains a single integer q~(0 < q < 70000) — the number of queries.
Each of the next lines contains a query described by three integers , and x~(1 \le l \le r \le n,~0 < x < 10^9).
Print a string of characters. The -th character should be '' if there exists at least one city numbered from to where exactly people were transported by trams; otherwise, print ''.
Örnek 1