#K48257. Seat Occupancy Check

    ID: 28380 Type: Default 1000ms 256MiB

Seat Occupancy Check

Seat Occupancy Check

You are given a string H that represents the occupancy of seats in a row. Each character in the string is either 'O' (occupied) or 'E' (empty). You are also given several queries; each query is a pair of integers L and R (1-indexed) representing a segment of seats. For each query, determine whether the segment from L to R is fully occupied. Formally, for a segment, if for every index i with L ≤ i ≤ R the seat is occupied, then the segment is considered full, i.e., \[ \forall i \in [L, R],\; H_i = O \] Otherwise, it is not full.

Output "Full" if the segment is completely occupied, otherwise output "Not Full" for that query.

inputFormat

The input is given via standard input (stdin). The first line contains a string H representing seat occupancy. The second line contains an integer Q, the number of queries. Each of the following Q lines contains two space-separated integers L and R representing a query.

outputFormat

For each query, print a line containing either "Full" if all seats in the segment are occupied, or "Not Full" otherwise.

## sample
EOOEEOOOO
3
1 3
4 7
2 5
Not Full

Not Full Not Full

</p>