My python snippet is failing i dont know why

contents = []
while True:
try:
line = int(input())
except EOFError:
break
contents.append(line)
n1=contents[0]
n2=contents[1]
i=1
c=0
while c!=n1:
if (3i+2)%n2!=0:
print (3
i+2)
c+=1
else:
pass
i+=1

can you kindly look at it even though its giving the write ans

@KushagraNITJ
Always share your code using cb.lk/ide . Indentation is extremely important in Python and copy-pasting your code here as text ruins that. Kindly save your code over the IDE and share the link here.