Solution for Sarpoint Code-a-Thon 2012