How did the ancient Greeks take advantage of the Mediterranean Sea to become a military power?