#include<stdio.h>
#include<stdlib.h>
int max=5;

int stack[max];
int top == -1;

void push(int value){
    if(top==max-1){
        return 0;
    }
    else{
        stack[++top] = value;
        printf("PUSH ",value);
    }
}

void pop(){
    if(top==-1){
        printf("Invalid input");
    }
    else{
        top--;
        printf("POP");
    }
}

void peek(){
    if(top == -1){
        printf("Invalid input");
    }
    else{
        printf("PEEK ",stack[top]);
    }
}

// void display(){
//     if(top==-1){
//         printf("Invalid input");
//     }
//     else{
//         for(int i=0; i<=top; i++){
//             printf("%d",stack[i]);
//         }
//     }
int main(){
    int top, max,value;
    
    push(10);
    push(20);
    pop();
    display();
    peek();
    return 0;
    }
  }