int main(void)
{
    int c1 ;
    int i2 ;

    {
        c1 = 0;
        r1 = __VERIFIER_nondet_uchar();
        id1 = __VERIFIER_nondet_char();
        st1 = __VERIFIER_nondet_char();
        send1 = __VERIFIER_nondet_char();
        mode1 = __VERIFIER_nondet_bool();
        alive1 = __VERIFIER_nondet_bool();
        id2 = __VERIFIER_nondet_char();
        st2 = __VERIFIER_nondet_char();
        send2 = __VERIFIER_nondet_char();
        mode2 = __VERIFIER_nondet_bool();
        alive2 = __VERIFIER_nondet_bool();
        id3 = __VERIFIER_nondet_char();
        st3 = __VERIFIER_nondet_char();
        send3 = __VERIFIER_nondet_char();
        mode3 = __VERIFIER_nondet_bool();
        alive3 = __VERIFIER_nondet_bool();
        id4 = __VERIFIER_nondet_char();
        st4 = __VERIFIER_nondet_char();
        send4 = __VERIFIER_nondet_char();
        mode4 = __VERIFIER_nondet_bool();
        alive4 = __VERIFIER_nondet_bool();
        id5 = __VERIFIER_nondet_char();
        st5 = __VERIFIER_nondet_char();
        send5 = __VERIFIER_nondet_char();
        mode5 = __VERIFIER_nondet_bool();
        alive5 = __VERIFIER_nondet_bool();
        i2 = init();
        __VERIFIER_assume(i2);
        p1_old = nomsg;
        p1_new = nomsg;
        p2_old = nomsg;
        p2_new = nomsg;
        p3_old = nomsg;
        p3_new = nomsg;
        p4_old = nomsg;
        p4_new = nomsg;
        p5_old = nomsg;
        p5_new = nomsg;
        i2 = 0;
        while (1) {
            {
                node1();
                node2();
                node3();
                node4();
                node5();
                p1_old = p1_new;
                p1_new = nomsg;
                p2_old = p2_new;
                p2_new = nomsg;
                p3_old = p3_new;
                p3_new = nomsg;
                p4_old = p4_new;
                p4_new = nomsg;
                p5_old = p5_new;
                p5_new = nomsg;
                c1 = check();
                assert(c1);
            }
        }
    }
    return 0;
}
void main(void) 
{ 
  int c1 ;
  int i2 ;

  {
  c1 = 0;
  ep12 = __VERIFIER_nondet__Bool();
  ep13 = __VERIFIER_nondet__Bool();
  ep14 = __VERIFIER_nondet__Bool();
  ep21 = __VERIFIER_nondet__Bool();
  ep23 = __VERIFIER_nondet__Bool();
  ep24 = __VERIFIER_nondet__Bool();
  ep31 = __VERIFIER_nondet__Bool();
  ep32 = __VERIFIER_nondet__Bool();
  ep34 = __VERIFIER_nondet__Bool();
  ep41 = __VERIFIER_nondet__Bool();
  ep42 = __VERIFIER_nondet__Bool();
  ep43 = __VERIFIER_nondet__Bool();
  id1 = __VERIFIER_nondet_char();
  r1 = __VERIFIER_nondet_char();
  st1 = __VERIFIER_nondet_char();
  nl1 = __VERIFIER_nondet_char();
  m1 = __VERIFIER_nondet_char();
  max1 = __VERIFIER_nondet_char();
  mode1 = __VERIFIER_nondet__Bool();
  id2 = __VERIFIER_nondet_char();
  r2 = __VERIFIER_nondet_char();
  st2 = __VERIFIER_nondet_char();
  nl2 = __VERIFIER_nondet_char();
  m2 = __VERIFIER_nondet_char();
  max2 = __VERIFIER_nondet_char();
  mode2 = __VERIFIER_nondet__Bool();
  id3 = __VERIFIER_nondet_char();
  r3 = __VERIFIER_nondet_char();
  st3 = __VERIFIER_nondet_char();
  nl3 = __VERIFIER_nondet_char();
  m3 = __VERIFIER_nondet_char();
  max3 = __VERIFIER_nondet_char();
  mode3 = __VERIFIER_nondet__Bool();
  id4 = __VERIFIER_nondet_char();
  r4 = __VERIFIER_nondet_char();
  st4 = __VERIFIER_nondet_char();
  nl4 = __VERIFIER_nondet_char();
  m4 = __VERIFIER_nondet_char();
  max4 = __VERIFIER_nondet_char();
  mode4 = __VERIFIER_nondet__Bool();
  i2 = init();
  __VERIFIER_assume(i2);
  p12_old = nomsg;
  p12_new = nomsg;
  p13_old = nomsg;
  p13_new = nomsg;
  p14_old = nomsg;
  p14_new = nomsg;
  p21_old = nomsg;
  p21_new = nomsg;
  p23_old = nomsg;
  p23_new = nomsg;
  p24_old = nomsg;
  p24_new = nomsg;
  p31_old = nomsg;
  p31_new = nomsg;
  p32_old = nomsg;
  p32_new = nomsg;
  p34_old = nomsg;
  p34_new = nomsg;
  p41_old = nomsg;
  p41_new = nomsg;
  p42_old = nomsg;
  p42_new = nomsg;
  p43_old = nomsg;
  p43_new = nomsg;
  i2 = 0;
  while (1) {
    {
    node1();
    node2();
    node3();
    node4();
    p12_old = p12_new;
    p12_new = nomsg;
    p13_old = p13_new;
    p13_new = nomsg;
    p14_old = p14_new;
    p14_new = nomsg;
    p21_old = p21_new;
    p21_new = nomsg;
    p23_old = p23_new;
    p23_new = nomsg;
    p24_old = p24_new;
    p24_new = nomsg;
    p31_old = p31_new;
    p31_new = nomsg;
    p32_old = p32_new;
    p32_new = nomsg;
    p34_old = p34_new;
    p34_new = nomsg;
    p41_old = p41_new;
    p41_new = nomsg;
    p42_old = p42_new;
    p42_new = nomsg;
    p43_old = p43_new;
    p43_new = nomsg;
    c1 = check();
    assert(c1);
    }
  }
}
}
int main (int argv, char **argc) {

	MaxStack maxStackObj;
	try {
		maxStackObj.Pop();
	} catch (std::exception &e) {
		std::cout << e.what() << std::endl;
	}
	try {
		maxStackObj.Max();
	} catch (std::exception &e) {
		std::cout << e.what() << std::endl;
	}
	maxStackObj.Push(-78);
	std::cout << "Max: " << maxStackObj.Max() << std::endl;
	maxStackObj.Push(-7);
	std::cout << "Max: " << maxStackObj.Max() << std::endl;
	maxStackObj.Push(3);
	std::cout << "Max: " << maxStackObj.Max() << std::endl;
	maxStackObj.Pop();
	std::cout << "Max: " << maxStackObj.Max() << std::endl;
	maxStackObj.Pop();
	std::cout << "Max: " << maxStackObj.Max() << std::endl;
	maxStackObj.Pop();
	maxStackObj.Push(0);
	std::cout << "Max: " << maxStackObj.Max() << std::endl;
	maxStackObj.Push(100);
	std::cout << "Max: " << maxStackObj.Max() << std::endl;

	Stack stackObj;
	std::cout << "Result of RPN expr: (3 4 + 2 * 1 +) is :"
			<< stackObj.EvaluateRpn("3 4 + 2 * 1 +") << std::endl;

	std::cout << "Result of RPN expr: (5 1 2 + 4 * + 3 -) is :"
			<< stackObj.EvaluateRpn("5 1 2 + 4 * + 3 -") << std::endl;

	std::cout << "Expression : [({[()]})] is :";
	stackObj.IsWellFormed("[({[()]})]") ?
			std::cout << "Well Formed" << std::endl :
			std::cout << "Not Well Formed" << std::endl;

	std::cout << "Expression : [{{{}}}[][]]]]({[()]})] is :";
	stackObj.IsWellFormed("[{{{}}}[][]]]]({[()]})]") ?
			std::cout << "Well Formed" << std::endl :
			std::cout << "Not Well Formed" << std::endl;

	std::cout << "Expression : ({[()]}){{}}[ is :";
	stackObj.IsWellFormed("({[()]}){{}}[") ?
			std::cout << "Well Formed" << std::endl :
			std::cout << "Not Well Formed" << std::endl;


	Node node(23);
	Node node1(37);
	Node node2(29);
	Node node3(41);
	Node node4(31);

	node.right = &node1;
	node1.left = &node2;
	node1.right = &node3;
	node2.right = &node4;

	std::cout << "BST InOrder with stack from 23 is: " << std::endl;
	std::vector<int> inOrder = stackObj.BSTSortedOrderWithStack(&node);
	for (auto i : inOrder) {
		std::cout << i << " ";
	}
	std::cout << std::endl;

	std::cout << "Building with input stream East to West: [4 3 5 3 1 4 2] " << std::endl;
	std::cout << "Building indices with sunset views are: " << std::endl;
	std::vector<int> result1 = stackObj.BuildingsWithSunsetViewEastToWest("4 3 5 3 1 4 2");
	for (auto i : result1) {
		std::cout << i+1 << " ";
	}
	std::cout << std::endl;

	std::cout << "Building with input stream West to East: [2 4 1 3 5 3 4] " << std::endl;
	std::cout << "Building indices with sunset views are: " << std::endl;
	std::vector<int> result2 = stackObj.BuildingsWithSunsetViewWestToEast("2 4 1 3 5 3 4");
	for (auto i : result2) {
		std::cout << i+1 << " ";
	}
	std::cout << std::endl;

	std::stack<int> s;
	s.push(5);
	s.push(4);
	s.push(3);
	s.push(2);
	s.push(1);
	std::cout << "Stack with LIFO: 1 2 3 4 5" << std::endl;
	stackObj.SortStack(s);
	std::cout << "Sorted Stack in descending order" << std::endl;
	int size = s.size();
	for (int i = 0; i < size; i++) {
		std::cout << s.top() << " ";
		s.pop();
	}
	std::cout << std::endl;

	return 0;
}