solve Maximum & Gaby Invanushka