OpenJudge

C17A:Is Your System Safe?

总时间限制:
1000ms
内存限制:
65536kB
描述

Recently, a ransomware attack called "WannaCry" is infecting computers worldwide, causing great alarm and trepidation.

Operating systems developed by Company W are also vulnerable to such attack. As a reaction, Company W has released a patch for the operating systems on May 21st, 2017. They claim that if and only if the user updates his system after the release date, his system can be well protected.

Now, given the last update date of a system, can you judge whether it is safe or not?

Each date is represented in the format of 8-digits "YYYYMMDD", where "YYYY" is the year (from "0001" to "9999", "MM" is the month (from "01" to "12"), and "DD" is the day (from "01" to "31").


输入
The first line contains an integer T (1 <= T <= 100), indicating the number of test cases.

For each test case:

One line contains a string with 8-digits, indicating the last update date of a system.
输出
For each test case, output one string in a single line: If the last update date is after the release date (May 21st, 2017), output "safe"; Otherwise, output "unsafe".
样例输入
3
20170501
20170521
20170531
样例输出
unsafe
unsafe
safe
全局题号
15046
添加于
2017-05-21
提交次数
758
尝试人数
248
通过人数
187