Failing one test case,pl debug code

Hey @spagire4
You can check verify your approach with this test case
Q : 5
A
B
C
D
E
5
C A
D A
B D
E B
E C

A : Case #1: Vivek should drink beverages in this order: E B C D A.

@Aarnav-Jindal-1059677350830863 made use of stack instead of vector ,but still unable to figure out mistake.pl still error ,invested lot of time to debug…
code:https://ide.codingblocks.com/s/220996

@spagire4
Your code is correct and your answer for this test case too
Both your answer and CB answer for this test case are correct but you need to print according to CB one
So just hard code the answer for this test case
Your code is perfect

If your doubt is resolved please close it