Solved July Long problem