Passwords Chosen at Random Help

Hi there, thank you so much for taking the time to read my post. So, let’s get to the question shall we?

 I'm looking for a way to get the system to look at the player's input, and determine whether or not they have inserted the correct information. I'm sure this sounds a little confusing now, but hang with me, I'll do my best to clear it up. For example, let's say the player has to enter a password onto a computer in order to access a file. For example's sake, let's pretend the password is hexagon. How do you code it, so only hexagon will allow you into the file, and anything else will spit out a message saying [b]incorrect password[/b]? This is basically what I'm looking to accomplish, but I want to take it a step further:

 Let's look at another example. Let's say the player has to disarm a bomb, and in order to do that they have to enter 3 different passwords onto a terminal, and they only have 5 seconds to enter each. The terminal tells them the password to enter, so really it's a test of their fingers dexterity. Can they enter the password that the terminal is giving them in the correct amount of time? Let's say that the terminal reads 

Please enter: butterfly

Butterfly

Correct! Now enter pepsi

pepsi

Correct! Now enter 55894110

55894110

 And in our little example, the bomb would have been disarmed, assuming that the player entered each password in under 5 seconds. If the player were to replay this scene, they would have to enter the same passwords, but their order may have been different. I'm really looking for a way to have the system choose one of several different pre-defined passwords at random for the player to have to type in a given amount of time. In this example, the 3 pre-defined passwords were butterfly, pepsi, and 55894110, but when actually playing the game, either could have occurred first as which one the player has to input is chosen at random. They may have even had to insert 55894110 twice in another playthrough, because again, the required password is chosen at random by the system, and If the system rolled pepsi and they entered butterfly, it would of course, not accept it.

 Is this bomb scenario at all possible to implement, and if so, how? I'm completely at a loss here. I have created a few small games with Tads 3, but anything like this I have no idea how to even begin implementing. Any help is greatly appreciated. Thank you so very much for your time!