You have entered a mysterious tunnel with your friend. As you get to the middle of the room, flames rise at both ends, disallowing you from exiting.
On a table you see a row of 7 bottles of potions, each a different size. The largest bottle is second from the left, and the smallest is fourth from the right. There also is a riddle.
"Danger lies before you, while safety lies behind,
Two of us will help you, whichever you would find.
One among us seven will let you move ahead,
another will transport the drinker back instead,
Two among our number hold only nettle wine,
Three of us are killers, waiting hidden in line.
Choose, unless you wish to stay here forevermore,
To help you in your choice, we give you these clues four
First, however slyly the poison tries to hide
You will always find some on nettle wine's left side;
Second, different are those who stand at either end.
But if you would move onward, neither is your friend;
Third as you see clearly, all are different size.
Neither dwarf nor giant holds death in their insides;
Fourth, the second left and the second on the right
Are twins once you taste them, though different at first sight.
Which bottle will contain the potion to allow you to continue on in the tunnel, and which one will allow your friend to go backward in the tunnel?
(Taken from "Harry Potter and the Sorcerer's Stone")