luckynumbers2

Problem Description

A number is considered lucky if it can be represented as a sum of a non-negative number of 4s and a non-negative number of 7s. For example, 18 is lucky because 18 = 7 + 7 + 4. Given T numbers in an array A, tell me whether each of them is lucky.

Input

The first line of input will contain one integer, T.

The second line of input will contain T integers, representing the array A.

Output

The output should contain T lines with T strings, either "Lucky" or "Unlucky", with the i-th line representing the luckiness of the i-th number.

Limits

For all subtasks: 1 ≤ T ≤ 105.

Subtask 1 (12%): 1 ≤ T, Ai ≤ 100.

Subtask 2 (37%): 1 ≤ Ai ≤ 106.

Subtask 3 (20%): 1 ≤ Ai ≤ 109.

Subtask 4 (31%): 1 ≤ Ai ≤ 1018.

Subtask 5 (0%): Sample Testcases.

Sample Input 1

4
1 4 11 17

Sample Output 1

Unlucky
Lucky
Lucky
Unlucky


Submitting to 'luckynumbers2'


You're not logged in! Click here to login


Submitting to 'luckynumbers2'


You're not logged in! Click here to login


Submitting .cpp to 'luckynumbers2'


You're not logged in! Click here to login

Time Limit: 1 Seconds
Memory Limit: 1024MB
Your best score: 0
Source: Dec Course Final Contest 2017

Subtask Score
1 12
2 37
3 20
4 31
5 0