Solution for Omicron 2012 task