I'm not interested in in giving you the answer directly, but I can help you find it.
Look carefully at the 5 membered rings that are present on both sides of the dimethylbenzene ring in the middle. How could they have been formed? Also remember that the benzene on the extreme left is not isolated...it's attached to the N on the extreme right.
Hint : -NH2 + -COOH ...remove water
This is a trick that comes handy almost everywhere when you're dealing with polymers