completed base requirements for problem 165-Hard