#include<stdio.h>
int main()
{
int ch = 0;
int count = 0;
while((ch=getchar())!=EOF)
{
if(ch=='{')
{
count++;
}
if(ch=='}')
{
count--;
}
if(count<0)
{
printf("不匹配"); //排除形如}}{{的形式
return 0;
}
}
if(count==0)
{
printf("匹配");
}
else
{
printf("不匹配");
}
return 0;
}