Solve the programming task below in a Python markdown code block.
There are a number of plants in a garden. Each of the plants has been treated with some amount of pesticide. After each day, if any plant has more pesticide than the plant on its left, being weaker than the left one, it dies.  

You are given the initial values of the pesticide in each of the plants. Determine the number of days after which no plant dies, i.e. the time after which there is no plant with more pesticide content than the plant to its left.  

Example  

$p=[3,6,2,7,5]$  // pesticide levels

Use a $1$-indexed array.  On day $1$, plants $2$ and $\begin{array}{c}4\end{array}$ die leaving $p'=[3,2,5]$.  On day $2$, plant $3$ in $p'$ dies leaving $p''=[3,2]$.  There is no plant with a higher concentration of pesticide than the one to its left, so plants stop dying after day $2$.  

Function Description 

Complete the function poisonousPlants in the editor below.  

poisonousPlants has the following parameter(s):

int p[n]: the pesticide levels in each plant  

Returns 

- int: the number of days until plants no longer die from pesticide  

Input Format

The first line contains an integer $n$, the size of the array $\boldsymbol{p}$. 

The next line contains $n$ space-separated integers $p[i]$.  

Constraints

$1\leq n\leq10^5$ 

$0\leq p[i]\leq10^9$

Sample Input
7
6 5 8 4 7 10 9

Sample Output
2

Explanation

Initially all plants are alive.  

Plants = {(6,1), (5,2), (8,3), (4,4), (7,5), (10,6), (9,7)}   

Plants[k] = (i,j) => $j^{th}$ plant has pesticide amount = i.  

After the$ 1^{st} $day, 4 plants remain as plants 3, 5, and 6 die.  

Plants = {(6,1), (5,2), (4,4), (9,7)}  

After the $2^{nd} $day, 3 plants survive as plant 7 dies.

Plants = {(6,1), (5,2), (4,4)}  

Plants stop dying after the $2^{nd}$ day.