Splits the task into chunks and solves them.