You are given a string of lowercase Latin letters. You must answer queries of the following type:
Given two substrings defined by starting and ending indices , and , , output '1' if the substring of from to is equal to the substring from to , and '0' otherwise.
It is guaranteed that both , and , form valid substrings of . Indices in this problem start from . Both ends of the segment are included in the substring.
The first line contains , the number of test cases.
For each test case, the first line contains the string . The next line contains the number of queries . Each of the following lines contains integers: , , , , corresponding to a query.
It is guaranteed that 1 \leq T \leq 10, 1 \leq |\textbf{S}| \leq 100000, 1 \leq Q \leq 100000, 0 \leq i \leq j \leq |\textbf{S}| - 1, 0 \leq k \leq l \leq |\textbf{S}| - 1. Here, denotes the length of the string .
For each test case, output one line with a string of characters. Each character should be '1' or '0', representing the answer to the corresponding query.
Example 1