Problem2290-- Weak Password

2290: Weak Password

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description



Time Limit: 2 sec / Memory Limit: 1024 MB

Score : 200200 points

Problem Statement

You are given a 44-digit PIN: X_1X_2X_3X_4X1X2X3X4, which may begin with a 00. 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 ii such that 1\leq i\leq 31i3X_{i+1}Xi+1 follows X_iXi. Here, j+1j+1 follows jj for each 0\leq j\leq 80j8, and 00 follows 99.
If the given PIN is weak, print Weak; otherwise, print Strong.

Constraints

  • 0 \leq X_1, X_2, X_3, X_4 \leq 90X1,X2,X3,X49
  • X_1X1X_2X2X_3X3, and X_4X4 are integers.

Input

Input is given from Standard Input in the following format:
X_1X_2X_3X_4X1X2X3X4

Output

If the given PIN is weak, print Weak; otherwise, print Strong.

Sample Input Copy

7777

Sample Output Copy

Weak

Source/Category