Output i should get:
0
potion x1
Cancel
0
I don't see where that "Cancel" should come from.
With your code, the dots on the second, third and fourth lines are obviously going to cause problems, but I guess you added them just for posting.
It looks like your code is supposed to write the numbers 0 through to 19 on top of each other in two different places and write the names of 20 different items on top of each other, with the number of each item next to them, also all on top of each other.
The code looks like it should be outputting something different to what you say it should output. If you edited the code before posting, to try to get rid of irrelevant parts, maybe you accidentally got rid of something important. If this is the case, post the whole of your original
until loop.