Code to generate solutions to IQ-Block