For this Question: Given an Array A of N integers. For each i (1 <= i <= N), find the rightmost (largest) index j (1 <= j <= N) such that A<sub>j</sub> >= A<sub>i</sub>.First line of input contains a single integer N.
Second line of input contains N integers, denoting the elements of the array.

Constraints:
1 <= N <= 100000
1 <= A[i] <= 1000000000Print N space separated integers the values of j for each i from 1 to N.Sample Input:
5
5 2 4 3 1

Sample Output:
1 4 3 4 5
, I have written this Solution Code: n = int(input())
l = list(map(int,input().split()))

suffix = [-1]*n
curr = 0

for i in range(n-1,-1,-1):
    curr = max(curr,l[i])
    suffix[i] = max(l[i],curr)

ans = [i for i in range(n)]

for i in range(n-1):
    fi = i+1
    li = n-1

    while(fi <= li):
        mid = fi + (li-fi)//2
        if(l[i] <= suffix[mid]):
            ans[i] = mid
            fi = mid+1
        if(l[i] > suffix[mid]):
            li = mid-1

for i in ans:
    print(i+1,end=" "), In this Programming Language: Python, Now tell me if this Code is compilable or not?