Help me in solving ST08 problem

My issue

My code is giving same output as given in question but still it is giving me wrong answer.

# Update the code below to solve the problem

t = int(input())
for i in range(t):
    S = input()
    
    l = len(S)
    flag = 0
    while i < l-2:
        if S[i] == "a" or S[i] == "e" or S[i] == "i" or S[i] == "o" or S[i] == "u":
            if S[i+1] == "a" or S[i+1] == "e" or S[i+1] == "i" or S[i+1] == "o" or S[i+1] == "u":
                if S[i+2] == "a" or S[i+2] == "e" or S[i+2] == "i" or S[i+2] == "o" or S[i+2] == "u":
                    flag =1
                    break
        i = i+1
    if flag == 1:
         print("Happy")
    else:
        print("Sad")

Learning course: Python for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone

Bro, you have not initialized ā€˜i’, hence it is using garbage value. Just initialize i=0 and problem will be solved.
Hope it helps:)