The rail-fence cypher is a transposition cypher that takes as a key a number of rails (in this example ). The plain-text message is written on the diagonal, going up and down on the rails:
G...D...O...E.... .O.D.A.H.W.R.Y.U. ..O...Y...A...O..
Finally, the message is read-out horizontally:
GDOE ODAHWRYU OYAO
Knowing the number of rows, we can write each segment under the other:
GDOE ODAHWRYU OYAO
and then reconstruct the rail-fence in order to obtain the plaintext.