// editor5
#include<stdio.h>
#include<ctype.h>
#include<string.h>
#definr MAX 25

char stack[MAX][MAX];
int top=-1;

void push(char ch[]){
    strcpy(stack[++top],ch);
}
char* pop(){
    return stach[top--];
}
int isoperator(char ch){
    return(ch=='+' || ch=='-' || ch=='*' || ch=='/');
}
int isvalid(char ch){
        return(isnum(ch) ch=='+' || ch=='-' || ch=='*' || ch=='/' || ch=='(' || ch==')');
}
void fun(char *str){
    int len=strlen(str),ind;
    for(ind=len-1;ind>=0;ind--){
        char ch=str[ind];
        if(isvalid(ch)){
            printf("Invalid input");
            return 0;
        }
        if(isoperator(ch)){
            char temp[2];
            temp[0]=ch;
            temp[1]='\0';
            push(temp);
        }
        else if(isoperator(ch)){
            char ope1[MAX],ope1[MAX],res[MAX];
            strcpy(ope1,pop());
            strcpy(ope2,pop());
            strcpy(res,ope2);
            int l=strlen(res);
            res[1]=ch;
            res[i+1]='\0';
            push(res);
        }
        printf("%s",stack[top]);
    }
    
}