Unable to submit my solution for Increasing Decreasing Sequence (Python Challenges)

This is my code, its working fine in Hacker blocks too, but I’m not able to submit it here. Is there something that I’m doing wrong ?

def IncDec(l,n) :
increasing = False
decreasing = True

for j in range(1,n) :
    if l[j-1]>l[j] :    #Decreasing Sequence
        if increasing == False :
            decreasing = True
        else :
            print(False)
            return
    elif l[j]>l[j-1] :   #Increasing Sequence
        if decreasing == True :
            increasing = True
        else :
            print(False)
            return
    else :
        print(False)
        return
print(True)

n = int(input())
l = []
for i in range(n) :
temp = input()
num = int(temp)
l.insert(i,num)
IncDec(l,n)

hi @Dikshita-Arora-2151742768237101
during submition all tset cases are not pasing or an particular