I have this code

```
x = "('A', 'NN'), ('B', 'AP'), ('C', 'RB'), ('D', 'NNP')"
m = re.findall(r"\('(.*?)', 'NN[.]?'\)", x)
print(m)

```

what I want is to extract text like A B C D only if its corresponding element is NN or any extension of NN like NNP, NND.

so the output should be A and D

but the current output is `['A']`