sed -ne:n -e's/\n/&/3;tp' \ -e'$!{N;bn' -e\} \ -e:p -e'/\n.*N.*\n/p' \ <in >out
If your input occurs in regular blocks of four lines per, and if you're looking for at least one N that doesn't occur on the last of these four, then the above bit of sed should suit your needs. It does assume that your entire input file will be blocked off on four-line groups. If this is not the case just let me know and I can make it a little less presumptuous.
Anyway, first sed gathers 4 input lines - or pulls in input lines until 3 \newline delimiters are found in pattern space - and next it looks for an N which does not occur on either the first or last of the 4 lines just gathered. If it finds it, it prints the four-line group, else nothing is printed and the next cycle will begin with the next 4-line group.
But apparently, you're trying to remove the block in question. In that case:
sed -e'$!N;/\n.*N/{$!N;$!N;d' -e'};n;n' <in >out
...will do the trick. It first appends the Next input line to pattern space, then checks for an N which occurs on the second line of a 4-line block, and, if one is found, sed pulls in two more lines on any line which is !not the $last before deleting the entire block. If the second line didn't match N, it overwrites pattern space twice with the next input line - auto-printing as it does - and autoprints the last of these as well.
You might also use the first bit of sed and just do /\n.*N.*\n/!p instead of p for the last address, too, of course. That may be advantageous in that you can more easily alter it by switching the 3 there to any other number of lines per block which might interest you.