Solution for Lambda 2011 task