Syntax Included

Time limit1sMemory limit128 MB

Problem

You are building your first website and keep making simple HTML syntax mistakes. To catch them, you decide to write an HTML parser that determines whether your HTML code is syntactically correct, based on the following condensed HTML definition:

HTMLCODE<HTML>BODY</HTML>
BODY<BODY>TEXT</BODY>
TEXTSTRING | STRING TEXT | TAG | TAG TEXT
STRINGa possibly empty run of printable characters other than < and >
TAGBOLD | ITALICS | LINK
BOLD<B>TEXT</B>
ITALICS<I>TEXT</I>
LINK<A HREF=URL>TEXT</A>
URLhttp://STRING.com

Input

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

Each of the following $n$ lines contains one data set of up to 1000 characters. Spaces may appear anywhere within a data set.

All tags are case sensitive.

Output

For each data set, print one line.

If the code is syntactically correct, print:

Syntax Included

Otherwise, print:

No Syntax Included