#include <iostream> #include <string> using namespace std; class stack{ private: int s[100000]; int top_index = -1; public: void push(int x) { top_index += 1; s[top_index] = x; } void pop(){ if(top_index >= 0){ cout << s[top_index] << endl; top_index -=1; } else { cout <...