Employer Bond by taking a dated cheque.

Hello Everyone, Please help me in below case. One of the private software company took cheque of 2.5 Lakh for providing me the offer letter. Is this legal? I gave them a dated cheque of some amount and accepted the offer and signed the same. They provided the offer letter to me. Below lines written in offer letters : if the employee leaves the employment during the period of training , or if the employee fails to take up regular employment after completion of the training or for any reason leaves the services of the company before completion of the afore said minimum period of 2 Years, the employee shall pay to the company INR 3,50,000/-, Also in case, person offered employment under this agreement does not join the company on the given date, the person shall be liable to pay cost of hiring , time spent on hiring process and recruitment firm cost i.e Rs 2,00,000/- . Now i checked review of that company that was not good every person is saying that dont join that company So now i don't want to join that company. Please suggest me what should i do in this case. Is the company have the rights to encash the cheque that they took from me for providing me just the offer letter not even joining letter. They mentioned in offer letter if i will not join this company then i have to pay 2lakh but i not given 2lakh chque i given only 2.5 Lakh cheque. so i am confused what they can do or what they cant do. Where and how to file a case for such scenarios please help me to figure out this problem.