Ok, since you're a child I'm going to try to explain some things to you.
In order to give you a stable output voltage, these voltage regulators need at least 2v above the output voltage. If you have a 7818, which outputs 18v, you need 20v at input to make it work.
These voltage regulators 78xx manage to output a stable voltage by dissipating the excess as heat. If the input voltage is 10 v and the output voltage is 5v (when you use a 7805) and you have a lightbulb or something on the output using 200 mA (0.2A), then the regulator will produce heat in the amount of (10v - 5v ) x 0.2 = 1 watt.
The regulator by itself is only capable of dissipating about 0.5-1 watts. Anything more, it must be put on a heatsink.
So if all regulators in your design use 20v as input voltage like you had in the first picture, the smaller regulator 7805 would dissipate 1 watt of heat with less than 100 mA of current (basically a few leds), because you would have (20v input - 5v output ) x 0.1 = 15 x 0.1 = 1.5 watts
Now if you connect them like in the second picture, the difference between input and output voltage is about 3v everywhere except with 7805 and 7806 and 7808 and 7809
: you can't power the 7805 with the output from 7806 because there's only 1v difference between them.
: you can't power the 7808 with the output from 7809 because there's only 1v difference between them
If you really want to go ahead with this design, rearrange to be like this :
7812 -> 7809
7812 -> 7808
7809 -> 7806
7808-> 7805
So let's take the case where you want 0.1A from 5v regulator (a few leds) ... the chain would be 7805 <- 7808 <- 7812 <- 7815 <-7818
7805 takes power from 7808, so it outputs 5v 0.1A and dissipates (8v-5v) x 0.1A = 0.3w
7808 needs to produce 0.1A for 7805, so it outputs 8v 0.1A and dissipates (12v-8v) x 0.1A = 0.4w
7812 needs to produce 0.1A for 7808, so it outputs 12v 0.1A and dissipates (15v - 12v) x 0.1A = 0.3w
7815 needs to produce 0.1A for 7812, so it outputs 15v 0.1A and dissipates (18v - 15v) x 0.1A = 0.3w
7818 needs to produce 0.1A for 7815 so it outputs 18v 0.1A and dissipates (20v - 18v) x 0.1A = 0.2w
So all these regulators 7818, 7818, 7815, 7808, 7805 produce 0.1A out of the maximum of 1-1.5A they can produce, and to get 5v 0.1A or 0.5 watts, you're dissipating 1.5 watts of energy. Your power supply is 25 % efficient.
But compare it with your previous design. 7805 doing 5v 0.1A from 20v input, would dissipate (20v - 5v ) x 0.1 = 15 x 0.1 = 1.5 watts. Same energy wasted as heat but all energy is now concentrated on a very tiny chip instead of being spread on 5 chips.
If you however needed to 0.3A or 0.5A , for a fan or something for example, you'd produce several watts of heat on a tiny cheap and burn it.
The smart way to do such a power supply is to use a transformer with two taps, one which would output about 12v DC , one which would output 20-24v DC. Connect the 7805 up to 7809 to first winding of transformer (after it's rectified using a bridge rectifier and smoothed out with a capacitor), connect the others to the larger input voltage.