Very simple, you provide €35,000 up front paid into an account of the airline's/agency's choice and they pay it back by 1/3 every year up to 3 years. After 3 years, you owe nothing and get your money back and are free to leave if that's what you wish without penalty. Leave before and they keep the pro-rated amount.
If you are unwilling to pay the airline/agency then you can deposit into a bank account of your choice providing the bank can give the airline/agency a guarantee that they will be paid the cost of the training if you leave early. This way your money is safe in case the airline/agency disappear.
Not an easy thing to do, finding €35,000 but there you have it.