you can invest 40000E on a TR but with a good fair salary you get it back in 6 to 8 months not years!!!!!!
40000/8=5000€/month... this is not a "good fair salary".... considering 2000€/month as a "normal" salary, it will take almost 2 years...
In the meanwhile you should "survive", so consider 1000€/month for personal needings (it's not so much...) you will have 3 years and half