Solution for Tau 2012 task