Automatically storing Rio
Declaring STACK's as Global

First Declare the STACK's as Global and after taking the inputs use
realloc( ) to increase the size of the STACK's