Solve Osmos (for the small input only)