search for keyword in subsequent lines and delete the second line

I have my data something like this

I need to search for the keyword yyyy in the susequent lines and if it is present, delete the second line with keyword.

In other words, if a keywords is found in two subsequent lines delete the second line.

input data:

aaaa bbbbb cccc dddd
xxxx yyyy xxxxx abc
xxxx yyyy xxxxx xyz
aaaa bbbbb cccc dddd
rrrrrrrrr ttttttt yyyy
xxxx yyyy xxxx
aaaa bbbbb cccc dddd
output expected:
aaaa bbbbb cccc dddd
xxxx yyyy xxxxx abc
aaaa bbbbb cccc dddd
rrrrrrrrr ttttttt yyyy
xxxx yyyy xxxx
aaaa bbbbb cccc dddd

shouldn't the output be this?

aaaa bbbbb cccc dddd
xxxx yyyy xxxxx abc
aaaa bbbbb cccc dddd
rrrrrrrrr ttttttt yyyy
aaaa bbbbb cccc dddd

Yes..You are correct!

output expected is

aaaa bbbbb cccc dddd
xxxx yyyy xxxxx abc
aaaa bbbbb cccc dddd
rrrrrrrrr ttttttt yyyy
aaaa bbbbb cccc dddd

Should be something like this:

awk '/yyyy/ && NR!=n {n=NR+1}
/yyyy/ && n==NR {next}
{print}' file

That worked Perfect!

thanks