100 atcoder#ABC212B. [ABC212B] Weak Password
[ABC212B] Weak Password
Score : points
Problem Statement
You are given a -digit PIN: , which may begin with a . The PIN is said to be weak when it satisfies one of the following conditions:
- All of the four digits are the same.
- For each integer such that , follows . Here, follows for each , and follows .
If the given PIN is weak, print Weak
; otherwise, print Strong
.
Constraints
- , , , and are integers.
Input
Input is given from Standard Input in the following format:
Output
If the given PIN is weak, print Weak
; otherwise, print Strong
.
7777
Weak
All four digits are , satisfying the first condition, so this PIN is weak.
0112
Strong
The first and second digits differ, and the third digit does not follow the second digit, so neither condition is satisfied.
9012
Weak
Note that follows .