There are boxes in a row, each colored either white or black. The boxes are numbered from left to right from to . Barysh gets annoyed when he sees a white box immediately following a black one. Therefore, he asks you to swap the boxes in every consecutive pair \{\text{black}, \text{white}\}.
In one pass, first find all pairs of consecutive boxes \{\text{black}, \text{white}\}, and then swap the boxes in each found pair. After one pass, there may still be consecutive \{\text{black}, \text{white}\} pairs in the row. In that case, repeat the process.
How many passes do you need to ensure that no consecutive pair \{\text{black}, \text{white}\} remains in the row?
The first line contains the integer (1 \le t \le 100) — the number of test cases.
For each test case, the first line contains an integer (1 \le n \le 10^4) — the number of boxes. The second line contains integers p_1, p_2, \ldots, p_n.
Each p_i describes the color of the -th box: p_i = 1 means the box is black, and p_i = 0 means the box is white.
For each test case, print on a separate line a single integer — the number of passes required.
Example 1
1 \le t \le 100
1 \le n \le 10^4
p_i \in \{0, 1\}
This problem consists of subtasks:
Subtask | Restrictions | Points |
|---|---|---|
0 | Sample | 0 |
1 | n \le 100 | 15 |
2 | No additional restrictions | 85 |