Opening a Door with Button Combination

Hi guys! How are you?
I would like to do a button sequence event in my game, for example: When the player gets on a specific place it has to input a sequence of buttons to open a door in a limited time.
For exemple:
A, B, C, T and it has a time to input each one. You guys have any idea of how i can achieve that?
I tried something like this:

But it doesn’t work ^^"
Any idea you guys give me it will help a lot, the real combination i would like to do is 6 keys long.

Y pressed set bool Ypressed = true and set timer by event for like4 sec and that event makes Ypressed=false. do this for each key.
when last key of combinitation was pressed if Ypressed and xpressed and Zpressed then do the action.
Or you can do this .

alternative:
Z is last key of combination in this solution .you basically open a gate when a key was pressed and close it after 3 seconds and last key enter the gates and if all were open function gets called.

It worked! I never worked with gates before so i was a litttle confused at first but now i understand ^^Thanks!