For this Question: In Newton City, there are N buildings in a line. A building is considered good if the height of the building is greater than or equal to all the buildings in its right side. 
Given the height of N buildings in the line, your task is to print the good buildings in the same order as they are given.

Note:- The rightmost building will always be good as their is no building in its right sideThe first line of input contains a single integer N. The next line of input contains N space- separated integers depicting the values of the array.

Constraints:-
1 <= N <= 100000
1 <= Arr[i] <= 100000Print all the good buildings as they appear in the array.Sample Input:-
6
3 7 4 1 2 1

Sample Output:-
7 4 2 1

Explanation:-
There is no greater element than 7 4 2 1 on their right side.

Sample Input:-
5
1 2 3 4 5

Sample Output:-
5, I have written this Solution Code: N = int(input())
data = [int(x) for x in input().strip().split(' ')]
viewable = []
for i in range(N):
    good = True
    for j in range(i+1,N):
        if data[j] > data[i]:
            good = False
            break
    if good:
        viewable.append(data[i])
print(*viewable), In this Programming Language: Python, Now tell me if this Code is compilable or not?