I want to go from Panamá to Turkey. There're direct flights of Turkish Airlines that are expensive. And there're flights Panamá -> Istanbul -> Baku
there're cheaper 2 times of the same airline. The transfer in Istanbul takes 6 hours.
Will it be a violation if I buy a ticket Panamá -> Istanbul -> Baku
and leave in Istanbul?