Solution while ignoring dummys