Confined to menacing walls and getting accustomed to a corrupt lifestyle, he has now chosen to reflect on prison life and his journey through a book.

The month-long ordeal, during which Mahajan shared space with 25 inmates and was confined inside the ward for 14 hours, with a few books, pen and paper, and jogging shoes giving him constant company, has been published as "The Bad Boys of Bokaro Jail" (Blue Salt/Rs. 250).

According to Delhi-based Mahajan, to overcome all frustrations and divert his mind he chose to keep a record of his everyday routine without even having the faintest idea that it would take the shape of a book.

"Writing was an outlet for myself in jail. It was basically survival tactics where I could keep myself engaged. This book is just a part of much of my ramblings in the jail, and my afternoons were dedicated to it," said Mahajan.

It was sheer irony that the 43-year-old Mahajan, who went to the Bokaro city in Jharkhand on a two-day trip, landed in jail on December 24, 2012, because his then employer was not able to refund money to the parents of students who had enrolled in his coaching institute - an issue he had gone to settle.

The writer initially struggled to connect with the reality, but he never allowed the helplessness to get to his nerves and instead chose to become a lens of what happens inside a prison.

"Life inside a jail is completely different from what you see in films. You go there with an image that there will be violence, sexual abuse and many other things, but thankfully, I didn't get to see any of this," he recollected.

"But it was the toughest time of my life where I was helpless and frustrated as my fate was not in my hands but in the hands of an employer who wasn't doing much," he added.

Making the most of the time Mahajan had, he read many books on his favourite subject - the second World War - and a few other authors he always wanted to read. Apart from this, he would always go for a morning jog.

The most challenging time for him was when he was forced inside his cell at 4.30 pm along with the other inmates.

"That was the most dreadful time because there wasn't much to do. At that time, all I could think was to how to get out and this would lead to more frustration," he said.

The one lesson this entire episode has taught him is "to live for the moment".

"Simple pleasures like eating a good, decent meal is a luxury in jail. So, I have started to live my life to the fullest and try my best to worry less about the future," he concluded.