I want to go from Panamá to Turkey. There're direct flights of Turkish Airlines that are expensive. And there're flights `Panamá -> Istambul -> Baku` there're cheaper 2 times of the same airline. The transfer in Istambul takes 6 hours.

[![enter image description here][1]][1]

Will it be a violation if I buy a ticket `Panamá -> Istambul -> Baku` and leave in Istambul?


  [1]: https://i.sstatic.net/D6heb.png