Parties have right to walk out: M. Karunanidhi