Best solutions for CCC '15 S3 - Gates