/*
#include <stdio.h>
int stack[50]={}; //정수를 저장하는 스택
int top = -1; //top : 맨 위 데이터의 위치
void push(int data) //맨 위에 데이터 삽입
{
if(top==49) return ; //full check
top++;
stack[top]=data;
}
int pop() //맨 위 데이터 출력
{
if(top==-1) //empty check
return -123456; //사용하지 않는 숫자 리턴
return stack[top--];
}
int main()
{
// 5 8 9 push // pop 3번
push(5);
push(8);
push(9);
while(top!=-1) //stack의 모든 원소 pop
{
printf("%d",pop());
}
return 0;
}
*/
/*
#include <stdio.h>
#include <string.h>
int stack[100000]={};
int top = -1;
void push(int data)
{
if(top==99999)
return ;
top++;
stack[top]=data;
}
int pop()
{
if(top==-1)
return -44649;
return stack[top--];
}
int main()
{
int i;
char num[1000000]={};
scanf("%s",num);
for(i=0;num[i]!=NULL;i++)
{
push(num[i]-48);
}
while(top!=-1)
{
printf("%d",pop());
}
return 0;
}
*/
/*
#include <stdio.h>
#include <string.h>
char stack[269]= {};
int top=-1;
void push(char data)
{
if(top==99999)
return ;
top++;
stack[top]=data;
}
char pop()
{
if(top==-1)
return -44649;
return stack[top--];
}
int main(void)
{
int strlennum;
int da=0;
int i;
char num[201];
scanf("%d %s",&strlennum,num);
for(i=strlennum-1; i>=0; i--)
{
push(num[i]);
da++;
if(da==3 && i>0)
{
push(',');
da=0;
}
}
while(top!=-1)
{
printf("%c",pop());
}
}
*/



