How to simulate workout routines for a dumbbell in ECNA 2017 Problem J?