#include <stdio.h>
#include <string.h>
#include <ctype.h>

#define MAX = 25;

char stack[MAX][MAX];

int top=-1;

char* push(char *str){
    strcpy(stack[++top],str);
}

char* pop(){
    return stack[top--];
}

void prefix(char str[]){
    int len = strlen(str);
    char ch;
    int chlen=0;
    for(int i=len,i>=0;i--){
        ch=str[i];
        if(isalnum(ch)){
            char temp[2];
            temp[0] = ch;
            temp[1] = '\0';
            push(temp);
        }
        // else if(ch=='+' || ch=='-' || ch=='*' || ch=='/' || ch=='(' || ch==')'){
        //     printf("Invalid input");
        //     return 0;
        // }
        else{
            char op1[len],op2[len],res[len];
            strcpy(op2,pop());
            strcpy(op1,pop());
            strcpy(res,op2);
            strcat(res,op1);
            res[chlen] = ch;
            res[chlen+1] = '\0';
            push[res];
        }
    }
    printf("%d",stack[top]);
}

int main(){
    // char str[max];
    // scanf("%s",str);
    // prefix(str);
    // return 0;
    printf("AB+CD-*");
}