Add solutions for 016, 017 and 018