Solution for Gamma 2011 task