1024. Syntax Included

单点时限: 2.0 sec

内存限制: 256 MB

You are writing your first website and seem to be making your fair share of simple HTML syntax errors. You have decided to write an HTML parser to help you determine if your HTML code is syntactically correct based on the following condensed HTML definition:


HTML CODE   BODY

BODY        TEXT

TEXT        STRING |STRING TEXT |TAG |TAG TEXT

STRING      possibly empty string of printable characters other than '<' and '>')

TAG     BOLD |ITALICS |LINK

BOLD        TEXT

ITALICS     TEXT

LINK        TEXT

URL     http://STRING.com

输入格式

The first line contains a single integer n indicating the number of data sets.

The following n lines each represent a data set and consists of up to 1000 characters. Spaces can be contained anywhere within the data set.

Note that all tags are case sensitive.

输出格式

If the code is syntactically correct, the following string will be printed:

“Syntax Included”

Otherwise the following string will be printed:

“No Syntax Included”

样例

Input
3
<HTML><BODY><B>Hello world!</B></BODY></HTML>
<HTML><BODY><B>Is this correct?</B></HTML>
<HTML><BODY><A HREF=http://www.go.com>link</A></BODY></HTML>
Output
Syntax Included
No Syntax Included
Syntax Included

3 人解决,16 人已尝试。

4 份提交通过,共有 63 份提交。

9.4 EMB 奖励。

创建: 19 年,7 月前.

修改: 7 年,2 月前.

最后提交: 3 年,12 月前.

来源: South Central USA 2004

题目标签