Code created as a part of Kurukshetra Hackathon 2014