#include<stdio.h>
#include<string.h>
int stack[30];
int top=0;
void push(int data)
{
stack[top++]=data;
}
char pop()
{
int n;
scanf("%d",&n);
}
void show()
{
int i;
for(i=top-1;i>=0;i--)
{
printf("%d",stack[i]);
}
}
int main()
{
char str[30];
int i;
scanf("%s",str);
for(i=0;i<strlen(str);i++)
{
if(str[i]=='(')
{
push(-1);
}
else if(str[i]=='[')
{
push(-2);
}
if(str[i]==')')
{
pop()
}
}
show();
}



