Edited my last question in order to contain the work I've done.
I have to find the output voltage Vo related to the input voltage Vi knowing that the input values range from 0V to 50V. All diodes are ideal.
I started by assuming that D3 is reversed biased. This means that D1 is forward biased and D2 is reversed biased if I am not mistaken.
So, I found VA= 3V (6V/2) using the voltage divider of the 2 5kΩ resistances. I made all this process in order to be able to define the range in which D3 conducts.
So, knowing that VA=3V, when D3 is OFF, I can say that D3 conducts when Ui>3V.
Then I got the range [3V,6V] where D3 and D1 are ON and D2 is OFF and found the output voltage related to the input voltage using the Millman's theorem.
Then I got the range [6V,20V], in which only D3 is ON , so again using a voltage divider on the simplified circuit with the 2,5kΩ and the 5kΩ resistances I found Vo=(2/3)Vi.
Finally I got the range [20V,50V] where both D3 and D2 are ON and D1 is OFF and again using a Millman's theorem found the output voltage.
However I don't know if this is the right way to approach this problem and i am not sure if my process is right. Any help is appreciated! Thanks in advance!