Combination Lock? Is it possible in VERSE

Im making a Puzzle/Escape room, and im really trying to be innovative and make puzzle maps harder, because the ones that are out now are easy and simple.

Im creating a bookshelf with books and i want them to pull the books in the correct order (doing it with animations and everything) Im learning programming in school, just not verse. I have a plan in my head but its all in Python, so im trying to convert it, but i cant figure out how to add a LETTER to a array after pressing a button.

I want them to go in an order so if they press any button(book) It will go into the array as [0] and then any other book pressed goes [1], I think you get what i mean!

After the 3 books have been pressed and the array is full with 3 elements i want it to compare to the CORRECT array i have made, if its the same the bookshelf moves, if not the array resets and they can press the buttons(books) again.

I provided an image bellow hope that helps!

Thank you, Marcuss