qyliang/CodeNanoFix huggingface dataset:
Buggy code:
for i in range(2):
  input = input()
  lines.append(int(input))
searchList = []  
for i in range(lines[0]):
  split = lines[1].split()
  if split[i] % 2 == 0:
    searchList.appned(split[i])
out = "APPROVED"
for s in searchList:
  if s % 3 != 0 and s % 5 != 0:
    out = "DENIED"
    print(out)
    break
print(out)
    

Fixed code:
lines = []
for i in range(2):
  inp = input()
  lines.append(inp)
searchList = []  
for i in range(int(lines[0])):
  split = lines[1].split()
  if int(split[i]) % 2 == 0:
    searchList.append(int(split[i]))
out = "APPROVED"
for s in searchList:
  if s % 3 != 0 and s % 5 != 0:
    out = "DENIED"
    print(out)
    break
if out == "APPROVED":
    print(out)
Buggy code:
N = int(input())
A = map(int, input().split())

A_ = [a for a in A if a % 2 == 0 and a % 3 == 0 and a % 5 == 0]

if len(A_) == N:
    print("APPROVED")
else:
    print("DENIED")

Fixed code:
N = int(input())
A = map(int, input().split())

A_ = [a for a in A if a % 2 == 0 and a % 3 != 0 and a % 5 != 0]

if len(A_) > 0:
    print("DENIED")
else:
    print("APPROVED")
Buggy code:
def fun(li):
  for i in li:
    if i%2 == 0:
      if i%3 == 0 or i%5 ==0:
        continue;
      else:
        return "DENIED"
return "APPROVED      
n = int(input())
li = [int(num) for num in input.split(" ")]
print(fun(li))

Fixed code:
def fun(li):
  for i in li:
    if i%2 == 0:
      if i%3 == 0 or i%5 ==0:
        continue;
      else:
        return "DENIED"
  return "APPROVED"
n = int(input())
li = [int(num) for num in input().split(" ")]
print(fun(li))
Buggy code:
n_num = int(input())
nums = map(int, input().split())

for num in nums:
    if num % 2 == 0:
        if num % 3 != 0 and num % 5 != 0:
            print('DINIED')
            break
else:
    print('APPROVED')


Fixed code:
n_num = int(input())
nums = map(int, input().split())

for num in nums:
    if num % 2 == 0:
        if num % 3 != 0 and num % 5 != 0:
            print('DENIED')
            break
else:
    print('APPROVED')
Buggy code:
n = int(input())
al = list(map(int, input().split()))

ans = "APPROVE"
for a in al:
    if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            ans = "DENIED"

print(ans)


Fixed code:
n = int(input())
al = list(map(int, input().split()))

ans = "APPROVED"
for a in al:
    if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            ans = "DENIED"
            break

print(ans)
Buggy code:
N = input()
A = [int(x) for x in input().split()]
x=0
for i in A:
  if A%2==0:
    if not A%3==0 or A%5==0:
      print("DENIED")
      x=1
      break
    
  else:
   	continue
  break
if x !=0:
	print("APPROVED")
  

Fixed code:
N = int(input())
A = [int(x) for x in input().split()]
 
x=0
for i in A:

  if i%2==0:
    if not i%3==0 and not i%5==0:
      print("DENIED")
      x=1
      break
    else:
      continue
    
  else:
   	continue
  break
if x ==0:
	print("APPROVED")
Buggy code:
N=int(input())
L=list(map(int,input().split()))
M=[]
for i in L:
  if i%2==0:
    M.append(i)
A='APPROVED'
for k in M:
  if k%3!=0 or k%5!=0:
    A='DENIED'
    break
print(A)

    
  

Fixed code:
N=int(input())
L=list(map(int,input().split()))
M=[]
for i in L:
  if i%2==0:
    M.append(i)
A='APPROVED'
for k in M:
  if k%3!=0 and k%5!=0:
    A='DENIED'
    break
print(A)
Buggy code:
N = int(input())
list = input().split()
for i in range(N):
  k = int(list[i])
  if k % 2 == 0:
    if k % 3 == 0 or k % 5 == 0:
        if k == int(list[N-1]):
          print("APPROVED")
    else:
      print("DENIED")
      break

Fixed code:
N = int(input())
list = input().split()
on = 0
for i in range(N):
  k = int(list[i])
  if k % 2 == 0:
    if k % 3 == 0 or k % 5 == 0:
      on = 1 
    else:
      print("DENIED")
      break
  if i == N-1:
  	print("APPROVED")
Buggy code:
n = int(input())
l = list(map(int, input().split()))
cnt = 0
for i in range(n):
  if l[i] % 2 == 0:
    if l[i] % 3 == 0:
      cnt += 1
    elif l[i] % 5 == 0:
      cnt += 1
  else:
    print("DENIED")
print("APPROVED")

Fixed code:
n = int(input())
l = list(map(int, input().split()))
cnt = 0
for i in range(n):
    if l[i] % 2 == 0:
        if l[i] % 3 == 0:
            cnt += 1
        elif l[i] % 5 == 0:
            cnt += 1
        else:
            print("DENIED")
            quit()
print("APPROVED")
Buggy code:
n=int(input())
a=[int(x) for x in input().input()]
flg=0
for x in a:
  if x%2==0 and x%3 and x%5:
    flg=1
if flg:
  print("DENIED")
else:
  print("APPROVED")

Fixed code:
n=int(input())
a=[int(x) for x in input().split()]
flg=0
for x in a:
  if x%2==0 and x%3 and x%5:
    flg=1
if flg:
  print("DENIED")
else:
  print("APPROVED")
Buggy code:
n = int(input().split())

a = list(map(int, input().split()))

flag == True

for i in range(n):
  if a[i]%2 == 0:
    if a[i]%3 != 0 or a[i]%5 != 0:
      print('DENIED')
      flag = False
      break
      
if flag:
  print('APPROVED')


Fixed code:
n = int(input())

a = list(map(int, input().split()))

flag = True

for i in range(n):
  if a[i]%2 == 0:
    if a[i]%3 != 0 and a[i]%5 != 0:
      print('DENIED')
      flag = False
      break
      
if flag:
  print('APPROVED')
Buggy code:
n = int(input())
a = list(map(int, input().split()))

del a[n:]

new1 = [i for i in range(len(a)) if a[i] % 2 == 0]
new2 = [i for i in range(len(new1)) if (new1[i] != 0 and (new1[i] % 3 == 0 or new1[i] % 5 == 0))]

if len(new1) == len(new2):
  print("APPROVED")
else:
  print("DENIED")


Fixed code:
n = int(input())
a = list(map(int, input().split()))

del a[n:]

new1 = [a[i] for i in range(len(a)) if a[i] % 2 == 0]
new2 = [i for i in range(len(new1)) if (new1[i] % 3 == 0 or new1[i] % 5 == 0 or new1[i] % 15 == 0)]

if len(new1) == len(new2):
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
n = int(input())
a = list(map(int, input().split()))
flg = True
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            pass
    else:
        flg = False
        break

if flg:
    print("APPROVED")
else:
    print("DENIED")



Fixed code:
n = int(input())
a = list(map(int, input().split()))
flg = True
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            pass
        else:
            flg = False
            break

if flg:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
a = list(map(int,input().split()))

b,c = 0,0
for i in a:
    if (i%2)==0:
        b += 1
        if(i%3 == 0) or (i%5 == 0):
            c += 1

if b == c:
    print('APPROVED')
else:
    print('DENIED')

Fixed code:
o = int(input())
a = list(map(int,input().split()))

b,c = 0,0
for i in a:
    if (i%2)==0:
        b += 1
        if(i%3 == 0) or (i%5 == 0):
            c += 1

if (b == c):
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
n = int(input())
arr = []
arr = list(map(int, input().split()))
flag = 0
for i in range(n):
  num = arr[i]
  if num % 2 == 0:
    if (num % 6 == 0) or (num % 10 == 0):
      flag = 1
    else:
      flag = 0
    if flag == 1:
      print("APPROVED")
    else:
      print("DENIED")

Fixed code:
n = int(input())
arr = []
arr = list(map(int, input().split()))
flag = 0
count = 0
for i in range(n):
  num = arr[i]
  if num % 2 == 0:
    count += 1
    if(num % 6 == 0) or (num % 10 == 0):
      flag += 1
      
if flag == count:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
N = int(input())
a_list = list(map(int, input().split()))
c = 0

for i in range(N):
    if a_list[i]  % 2 != 0:
        a = 1
    else:
        if (a_list[i] % 3 != 0) and (a_list[i] % 5 != 0):
            c = 1
        else:
            a = 1


if c == 1:
    print("DENID")
else:
    print("APPROVED")

Fixed code:
N = int(input())
a_list = list(map(int, input().split()))
c = 0

for i in range(N):
    if a_list[i]  % 2 != 0:
        a = 1
    else:
        if (a_list[i] % 3 != 0) and (a_list[i] % 5 != 0):
            c = 1
        else:
            a = 1


if c == 1:
    print("DENIED")
else:
    print("APPROVED")
Buggy code:
N=int(input())
A=list(map(int,input().split()))

lst=0
  
for i in range(N):
  if A[i]%2==0:
    if A[i]%3!=0 or A[i]%5!=0:
      lst+=1
      break

    
if lst==0:
  print('DENIED')
else:
  print('APPROVED')  


Fixed code:
N=int(input())
A=list(map(int,input().split()))

lst=0
  
for i in range(N):
  if A[i]%2==0:
    if A[i]%3!=0 and A[i]%5!=0:
      lst+=1
      break

    
if lst==1:
  print('DENIED')
else:
  print('APPROVED')
Buggy code:
a=int(input())
Paper=list(map(int,input().split()))
m=0
for i in range (a):
  if Paper[i]%2==0:
    if not Paper[i]%3==0 or Paper[i]%5==0:
      m=m+1
return m

if not m=0:
  print("DENIED")
else:
  print("APPROVED")


Fixed code:
a=int(input())
Papers=list(map(int,input().split()))
m=0
for i in range (a):
  if Papers[i] %2==0:
    if not (Papers[i] %3==0 or Papers[i] %5==0):
      m=m+1

if not m==0:
  print("DENIED")
else:
  print("APPROVED")
Buggy code:
N = int(input())
inList = list(map(int, input().aplit(" ")))

evenList = list([])

for item in inList:
  if item % 2 == 0:
    evenList.append(item)

jdgList = list([])

for evenItem in evenList:
  if ((evenItem % 3) == 0) or ((evenItem % 5) == 0):
    jdgList.append(evenItem)

if len(jdgList) == len(evenList):
  print("APPROVED")
else:
  print("DENIED")

Fixed code:
N = int(input())
inList = list(map(int, input().split(" ")))
 
evenList = list([])
 
for item in inList:
  if item % 2 == 0:
    evenList.append(item)

jdgList = list([])
 
for evenItem in evenList:
  if ((evenItem % 3) == 0) or ((evenItem % 5) == 0):
    jdgList.append(evenItem)

if len(jdgList) == len(evenList):
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
N=int(input())
a1=input().split()
a2=[int(i) for i in a1]
for i in a2:
    if i%2==0 and i%3!=0 and 1%5!=0:
        print('DENIED')
        break
else:
    print('APPROVED')

Fixed code:
N=int(input())
a1=input().split()
a2=[int(i) for i in a1]
for i in a2:
    if i%2==0 and i%3!=0 and i%5!=0:
        print('DENIED')
        break
else:
    print('APPROVED')
Buggy code:
n = int(input())
A = list(map(int, input().split()))
A = [a for a in A if a % 2 == 0]
print(A)

ans = "APPROVED"
for a in A:
    if (a % 3 != 0) and (a % 5 != 0):
        ans = "DENIED"
        break
print(ans)

Fixed code:
n = int(input())
A = list(map(int, input().split()))
A = [a for a in A if a % 2 == 0]

ans = "APPROVED"
for a in A:
    if (a % 3 != 0) and (a % 5 != 0):
        ans = "DENIED"
        break
print(ans)
Buggy code:
import sys
n=int(input())
a=map(int, input().split())
for i in a:
    if i%2==0 and i%3!=0 and i%5!=0:
        print("DEINED")
        sys.exit()


Fixed code:
import sys
n=int(input())
a=map(int, input().split())
for i in a:
    if i%2==0 and i%3!=0 and i%5!=0:
        print("DENIED")
        sys.exit()

print("APPROVED")
Buggy code:
line1 = input('')
line2 = input('') 
result = True
cnt = int(line1)
list = line2.split(' ')
if len(list) != cnt:
  result = False
if result:
  for no_str in list:
    no = int(no_str)
    if no % 2 == 0:
      print(no)
      if no % 3 != 0 and no % 5 != 0:
        print(no)
        result = False

if result :
  print('APPROVED')
else:
  print('DENIED')



Fixed code:
line1 = input('')
line2 = input('') 
result = True
cnt = int(line1)
list = line2.split(' ')
if len(list) != cnt:
  result = False
if result:
  for no_str in list:
    no = int(no_str)
    if no % 2 == 0:
      if no % 3 != 0 and no % 5 != 0:
        result = False

if result :
  print('APPROVED')
else:
  print('DENIED')
Buggy code:
N = int(input())
nums = [int(e) for e in input().split()]
for i in range(N):
    if nums[i]%2 == 1:
        pass
    else:
        if nums[i]%3 == 0 or nums[i]%3 == 0:
            pass
        else:
            print("DENIED")
            break
    if i == N-1:
        print("APPROVED")
    else:
        pass
    

Fixed code:
N = int(input())
nums = [int(e) for e in input().split()]
for i in range(N):
    if nums[i]%2 == 1:
        pass
    else:
        if nums[i]%3 == 0 or nums[i]%5 == 0:
            pass
        else:
            print("DENIED")
            break
    if i == N-1:
        print("APPROVED")
    else:
        pass
Buggy code:
n = int(inpout())
numbers = map(int, input().split())

even_numbers = []
for i in numbers:
  if i % 2 == 0:
    even_numbers.append(i)

answers = []
for i in even_numbers:
  if i % 3 == 0 or i % 5 == 0:
    answers.append(i)

if even_numbers == answers:
  print('APPROVED')
else:
  print('DENIED')

Fixed code:
n = int(input())
numbers = map(int, input().split())

even_numbers = []
for i in numbers:
  if i % 2 == 0:
    even_numbers.append(i)

answers = []
for i in even_numbers:
  if i % 3 == 0 or i % 5 == 0:
    answers.append(i)

if even_numbers == answers:
  print('APPROVED')
else:
  print('DENIED')
Buggy code:
N = int(input())
A = list(map(int,input().split()))
for a in A:
  if a % 2 == 0:
    if a % 3 != 0 and a % 3 != 0:
      print("DENIED")
      break
else:
  print("APPROVED")

Fixed code:
N = int(input())
A = list(map(int,input().split()))
for a in A:
  if a % 2 == 0:
    if a % 3 != 0 and a % 5 != 0:
      print("DENIED")
      break
else:
  print("APPROVED")
Buggy code:
n = int(input())
a = [int(x) for x in input().split()]

a_even = []
for ai in a:
    if ai%2 == 0:
        a_even += [ai]

ans = "APPROVED"
for a_eveni in a_even:
    if a_eveni%3 != 0 or a_eveni%5 != 0:
        ans = "DENIED"
        break

print(ans)

Fixed code:
n = int(input())
a = [int(x) for x in input().split()]

a_even = []
for ai in a:
    if ai%2 == 0:
        a_even += [ai]

ans = "APPROVED"
for a_eveni in a_even:
    if a_eveni%3 != 0 and a_eveni%5 != 0:
        ans = "DENIED"
        break

print(ans)
Buggy code:
def judge(N, A):
  cnt = 0
  odd = 0
  for i in range(N):
    if A[i] % 2 != 0:
      odd += 1
      continue
    else:
      if (A[i] % 3 == 0) or (A[i] % 5 == 0):
        cnt += 1
  even = N - odd
  if cnt == even:
    print('APROVED')
  else:
    print('DENIED')
    
N = int(input())
A = list(map(int, input().split()))
judge(N, A)

Fixed code:
def judge(N, A):
  cnt = 0
  odd = 0
  for i in range(N):
    if A[i] % 2 != 0:
      odd += 1
    else:
      if (A[i] % 3 == 0) or (A[i] % 5 == 0):
        cnt += 1
  even = N - odd
  if cnt == even:
    print('APPROVED')
  else:
    print('DENIED')
    
N = int(input())
A = list(map(int, input().split()))
judge(N, A)
Buggy code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

A = LI()

ans = False
for a in A:
    if a % 2 != 0:
        continue

    if a % 3 == 0 or a % 5 == 0:
        ans = True

if ans:
    print("APPROVED")
else:
    print("DENIED")


Fixed code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

A = LI()

ans = True
for a in A:
    if a % 2 != 0:
        continue

    if a % 3 != 0 and a % 5 != 0:
        ans = False

if ans:
    print("APPROVED")
else:
    print("DENIED")
Buggy code:
N = int(input())
A = list(map(int, input().split()))

flag = True
for i in range(N):
    if A[i]%2 == 0:
        if A[i]%3 != 0 and A[i]%5 != 0:
            frag = False

if flag:
    print('APPROVED')
else:
    print('DENIED')

Fixed code:
N = int(input())
A = list(map(int, input().split()))

flag = True
for i in range(N):
    if A[i]%2 == 0:
        if A[i]%3 != 0 and A[i]%5 != 0:
            flag = False

if flag:
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
N = int(input())
A = [int(i) for i in input().split()]
ans = True
for a in A:
  if a%2==0:
    if a%3!=0 or a%5!=0:
      ans = False
if ans:
  print("APPROVED")
else:
  print("DENIED")
      

Fixed code:
N = int(input())
A = [int(i) for i in input().split()]
ans = True
for a in A:
  if a%2==0:
    if a%3!=0 and a%5!=0:
      ans = False
if ans:
  print("APPROVED")
else:
  print("DENIED")
Buggy code:
if __name__ == '__main__':

	n = input()
	A = list(map(int,input().split()))

	cnt = 0
	for i in A:
		if i % 2 == 0:
			if i % 3 == 0 or i % 5 == 0:
				cnt += 1
		else:
			cnt += 1
	if cnt == n:
		print("APPROVED")
	else:
		print("DENIED")
	

Fixed code:
if __name__ == '__main__':

	n = int(input())
	A = list(map(int,input().split()))

	cnt = 0
	for i in A:
		if i % 2 == 0:
			if i % 3 == 0 or i % 5 == 0:
				cnt += 1
		else:
			cnt += 1
	if cnt == n:
		print("APPROVED")
	else:
		print("DENIED")
Buggy code:
    n=int(input())
    a = list(map(int,input().split()))
    even=[el for el in a if el % 2==0]
    try:
      for a in even:
        if a % 3 == 0 or a % 5 == 0:
          flg = 1
        else:
          raise
    except:
      print('DENIED')
    else:
      print('APPROVED')

Fixed code:
n=int(input())
a = list(map(int,input().split()))
even=[el for el in a if el % 2==0]
try:
  for a in even:
    if a % 3 == 0 or a % 5 == 0:
      flg = 1
    else:
      raise
except:
  print('DENIED')
else:
  print('APPROVED')
Buggy code:
n = input()
l = list(map(int, input().split()))
result = 'APPROVED'
for i in l:
  if i % 2 == 0:
    if i % 3 != 0 or i % 5 != 0:
      result = 'DENIED'
      break
print(result)

    

Fixed code:
n = input()
l = list(map(int, input().split()))
result = 'APPROVED'
for i in l:
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
      result = 'DENIED'
      break
print(result)
Buggy code:
N=int(input())
a=list(map(int,input().split()))
arr=[]
for A in a:
    if A%2==0:
        arr.append(A)
    else:
        pass

for n in arr:
    if n%3==0 or n%%==0:
        pass
    else:
        print('DENIED')
        exit()
print('APPROVED')

Fixed code:
N=int(input())
a=list(map(int,input().split()))
arr=[]
for A in a:
    if A%2==0:
        arr.append(A)
    else:
        pass

for n in arr:
    if n%3==0 or n%5==0:
        pass
    else:
        print('DENIED')
        exit()
print('APPROVED')
Buggy code:
n = int(input())
s = [int(x) for x in list(input().split()) if x%2 == 0]
ans = "APPROVED"
for i in s:
  if not i%5 != 0 && i%3 != 0:
    ans = "DENIED"
    pass
print(ans)


Fixed code:
n = int(input())
s = [int(x) for x in list(input().split()) if int(x)%2 == 0]
ans = "APPROVED"
for i in s:
  if i%5 != 0 and i%3 != 0:
    ans = "DENIED"
    pass
print(ans)
Buggy code:
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  if a[i]%2==0:
    if a[i]%3!=0 or a[i]%5!=0:
      print("DENIED")
      exit()
print("APPROVED")

Fixed code:
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  if a[i]%2==0:
    if a[i]%3!=0 and a[i]%5!=0:
      print("DENIED")
      exit()
print("APPROVED")
Buggy code:
import sys

n = int(input())
li = list(map(int, input().split()))

for i in range(n):
  a = li[i]
  if a%2 ==0:
    if (a % 3 == 0 or a % 5 == 0)==False:
      print("DENIED")
      sys.exit()

print("PASS")


Fixed code:
import sys

n = int(input())
li = list(map(int, input().split()))

for i in range(n):
  a = li[i]
  if a%2 ==0:
    if (a % 3 == 0 or a % 5 == 0)==False:
      print("DENIED")
      sys.exit()

print("APPROVED")
Buggy code:
def solve():
    X = list(map(int, input().split()))
    for x in X:
        if x%2 != 0:
            continue
        elif x%3 != 0 and x%5 != 0:
            return "DENIED"
    return "APPROVED"

print(solve())

Fixed code:
def solve():
    N = int(input())
    X = list(map(int, input().split()))
    for x in X:
        if x%2 == 0 and x%3 != 0 and x%5 != 0:
            return "DENIED"
    return "APPROVED"

print(solve())
Buggy code:
n = int(input())
a = list(map(int, input().split()))

flag = 0
for x in a:
  if x%2==0 and (x%3 and x%5):
    flag = 1
if flag:
  print("DEBIED")
else :
  print("APPROVED")


Fixed code:
n = int(input())
a = list(map(int, input().split()))

flag = 0
for x in a:
  if x%2==0 and (x%3 and x%5):
    flag = 1
if flag:
  print("DENIED")
else :
  print("APPROVED")
Buggy code:
# -*- coding: utf-8 -*-

# Input
s = [input() for i in range(2)]
N = int(s[0])
As = sorted(list(s[1].split()))

# Proccess
pp = "APPROVED"

for i in range(0,N-1):
	if int(As[i]) % 2 == 0 :
		if (int(As[i]) % 3)*(int(As[i]) % 5) == 0 :
			continue
		else:
			pp = "DENIED"
			break
		
# Output							
print(pp)

Fixed code:
# -*- coding: utf-8 -*-

# Input
s = [input() for i in range(2)]
N = int(s[0])
As = sorted(list(s[1].split()))

# Proccess
pp = "APPROVED"

for i in range(0,N):
	if (int(As[i]) % 2) == 0 :
		if (As[i] == 2)or(As[i] == 4):
			pp = "DENIED"
			break			
		elif (int(As[i]) % 3)*(int(As[i]) % 5) == 0 :
			continue
		else:
			pp = "DENIED"
			break
		
# Output						
print(pp)
Buggy code:
N = input()
raw_input1 = input()

l = raw_input1.split()
l_num = [int(x) for x in l]

flag = 0
flag1 = 0

for a in l_num:
    if a % 2 ==0:
        if a % 3 == 0 or a % 5 == 0:
            flag = 0
        else:
            flag = 1
    if flag != 0:
        break

if flag == 0:
    print('APPROVAL')
else:
    print('DENIED')

Fixed code:
N = input()
raw_input1 = input()

l = raw_input1.split()
l_num = [int(x) for x in l]

flag = 0
flag1 = 0

for a in l_num:
    if a % 2 ==0:
        if a % 3 == 0 or a % 5 == 0:
            flag = 0
        else:
            flag = 1
    if flag != 0:
        break

if flag == 0:
    print('APPROVED')
else:
    print('DENIED')
Buggy code:
a = int(input())
b = input().split()
b = list(map(int, b))
c = 0
for i in b:
    if i%3 != 0:
        if i%5 != 0:
            print("DENIED")
            break
    
    c +=1
if c == a:
    print("APPROVED")

Fixed code:
a = int(input())
b = input().split()
b = list(map(int, b))
c = 0
for i in b:
    if i%2 == 0:
         if i%3 != 0:
            if i%5 != 0:
                print("DENIED")
                break
    c +=1
if c == a:
    print("APPROVED")
Buggy code:
N = input()
_list = input().split(" ")
_list = [int(a) for a in _list]
aspect = [a for a in _list if a % 2==0]
ans = []
for a in even:
    if a % 3 == 0 or a % 5 == 0:
        ans.append(True)
if len(aspect) ==len(ans):
    print("APPROVED")
else:
    print("DENIED")

Fixed code:
N = input()
_list = input().split(" ")
_list = [int(a) for a in _list]
aspect = [a for a in _list if a % 2==0]
ans = []
for a in aspect:
    if a % 3 == 0 or a % 5 == 0:
        ans.append(True)
if len(aspect) ==len(ans):
    print("APPROVED")
else:
    print("DENIED")