// editor1
#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
#include<string.h>
#define MAX 5
int stack[MAX];
int top = -1;
int isValidintgers(char *str)
{
    if (str == NULL       *str =='\0')
    return 0;
    if(*str == '-')str++;
    while (*str){
        if(!isdigit(*str))
        return 0;
        str++;
    }
    return 1;
}
void push(int value)
{
    if(top == MAX -1)
    printf("stack overflow\n");
    else
       stack[++top];
}
void pop()
{
    if(top == -1)
    printf("stack underflow\n");
    else
       top--;
}
void peek()
{
    if(top == -1)
    printf("stack is empty\n");
    else
       printf("%d\n",stack[top]);
}
int main()
{
    char input[100];
    int value;
    char *commands[] = {"push 10","push 20","peek","push abc","push 30","peek","pop"};
    int n = sizeof(commands)/sizeof(commands[0]);
    for(int i =0;i<n;i++){
        strcpy(input, commands[i]);
        if (strncmp(input,"push",5)==){
            char*numstr=intput+5;
            if(isvalidintegers(numstr))
        }
    }
}