Language: C++

#include<stdio.h>

int main()
{
	char mt[1000],or[7],take[1000],co;
	int hight=0,count=0,i;
	for(;;){
		scanf("%s",or);
		if(or[2]=='i') break;
		
		if(or[2]=='p'){
			hight--;
			take[count]=mt[hight];
			mt[hight]=0;
			count++;
		}

		if(or[1]==0){
			mt[hight]=or[0];
			hight++;
		}
		for(i=0;i<7;i++){
			or[i]=0;
		}
	}
	
	for(i=0;i<count;i++){
		printf("%c\n",take[i]);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:23: error: expected unqualified-id before 'or' token
    5 |         char mt[1000],or[7],take[1000],co;
      |                       ^~
a.cc:8:28: error: expected primary-expression before 'or' token
    8 |                 scanf("%s",or);
      |                            ^~
a.cc:8:30: error: expected primary-expression before ')' token
    8 |                 scanf("%s",or);
      |                              ^
a.cc:9:20: error: expected primary-expression before 'or' token
    9 |                 if(or[2]=='i') break;
      |                    ^~
a.cc:9:23: error: expected identifier before numeric constant
    9 |                 if(or[2]=='i') break;
      |                       ^
a.cc: In lambda function:
a.cc:9:25: error: expected '{' before '==' token
    9 |                 if(or[2]=='i') break;
      |                         ^~
a.cc: In function 'int main()':
a.cc:9:25: error: no match for 'operator==' (operand types are 'main()::<lambda()>' and 'char')
    9 |                 if(or[2]=='i') break;
      |                      ~~~^~~~~
      |                      |    |
      |                      |    char
      |                      main()::<lambda()>
a.cc:11:20: error: expected primary-expression before 'or' token
   11 |                 if(or[2]=='p'){
      |                    ^~
a.cc:11:23: error: expected identifier before numeric constant
   11 |                 if(or[2]=='p'){
      |                       ^
a.cc: In lambda function:
a.cc:11:25: error: expected '{' before '==' token
   11 |                 if(or[2]=='p'){
      |                         ^~
a.cc: In function 'int main()':
a.cc:11:25: error: no match for 'operator==' (operand types are 'main()::<lambda()>' and 'char')
   11 |                 if(or[2]=='p'){
      |                      ~~~^~~~~
      |                      |    |
      |                      |    char
      |                      main()::<lambda()>
a.cc:13:25: error: 'take' was not declared in this scope
   13 |                         take[count]=mt[hight];
      |                         ^~~~
a.cc:18:20: error: expected primary-expression before 'or' token
   18 |                 if(or[1]==0){
      |                    ^~
a.cc:18:23: error: expected identifier before numeric constant
   18 |                 if(or[1]==0){
      |                       ^
a.cc: In lambda function:
a.cc:18:25: error: expected '{' before '==' token
   18 |                 if(or[1]==0){
      |                         ^~
a.cc: In function 'int main()':
a.cc:19:35: error: expected primary-expression before 'or' token
   19 |                         mt[hight]=or[0];
      |                                   ^~
a.cc:19:38: error: expected identifier before numeric constant
   19 |                         mt[hight]=or[0];
      |                                      ^
a.cc: In lambda function:
a.cc:19:40: error: expected '{' before ';' token
   19 |                         mt[hight]=or[0];
      |                                        ^
a.cc: In function 'int main()':
a.cc:23:25: error: expected primary-expression before 'or' token
   23 |                         or[i]=0;
      |                         ^~
a.cc: In lambda function:
a.cc:23:30: error: expected '{' before '=' token
   23 |                         or[i]=0;
      |                              ^
a.cc: In function 'int main()':
a.cc:28:31: error: 'take' was not declared in this scope
   28 |                 printf("%c\n",take[i]);
      |                               ^~~~