PROGRAMMING:Email Address
It is often necessary to check whether an email address is legal. The format of e-mail address is specified in Internet standards RFC 5321 and RFC 5322. An e-mail address is a string divided by @ into two parts: local part and domain local-part@domain . The local part of an e-mail address can be up to 64 characters, while the domain can be up to 253 characters.
Local part can use any of the following ASCII characters:
-Upper and lower case letters (A-Z, A-Z)
-Number (0-9)
-Hyphens (-), underscores (?), and The period (.) cannot appear in the first character, the last character, or two or more consecutive times.
Domain can use any of the following ASCII characters:
-Upper and lower case letters (A-Z, A-Z)
-Number (0-9)
-The period (.) cannot appear in the first character, the last character, or two or more consecutive times.
According to the above rules, cs@gzu.edu.cn Is a legal email address, and CS qin@gzu.edu.cn And Qin [CS] @ gzu.edu.cn are illegal email addresses.
###Input format:
The input file has multiple test data. Each test data occupies one line, and the last line of the file, over, means the end of the input.
###Output format:
For each line of string, judge whether it is a legal e-mail address. If it is legal, output legal, otherwise output illegal.
###Input example:
```in
cs@gzu.edu.cn
Abc.gzu.edu.cn
cs. jqin@gzu.edu.cn
A@b@c@gzu.edu.cn
()[]\;:,<>@ 163.com
over
```
###Output example:
```out
legal
illegal
legal
illegal
illegal
```
answer:If there is no answer, please comment
Local part can use any of the following ASCII characters:
-Upper and lower case letters (A-Z, A-Z)
-Number (0-9)
-Hyphens (-), underscores (?), and The period (.) cannot appear in the first character, the last character, or two or more consecutive times.
Domain can use any of the following ASCII characters:
-Upper and lower case letters (A-Z, A-Z)
-Number (0-9)
-The period (.) cannot appear in the first character, the last character, or two or more consecutive times.
According to the above rules, cs@gzu.edu.cn Is a legal email address, and CS qin@gzu.edu.cn And Qin [CS] @ gzu.edu.cn are illegal email addresses.
###Input format:
The input file has multiple test data. Each test data occupies one line, and the last line of the file, over, means the end of the input.
###Output format:
For each line of string, judge whether it is a legal e-mail address. If it is legal, output legal, otherwise output illegal.
###Input example:
```in
cs@gzu.edu.cn
Abc.gzu.edu.cn
cs. jqin@gzu.edu.cn
A@b@c@gzu.edu.cn
()[]\;:,<>@ 163.com
over
```
###Output example:
```out
legal
illegal
legal
illegal
illegal
```
answer:If there is no answer, please comment