If you have struggled with this, what code do you have so far?

Might help to provide file for analysis.