#CCBCHBAHAI0000120. Miền chỉ số của mảng 10 phần tử (Index Range of a 10-Element Array)

Miền chỉ số của mảng 10 phần tử (Index Range of a 10-Element Array)

Index Range of a 10-Element Array

Source: C Primer Plus

Version: Phuoc Hung OJ Extended

Problem Statement

Consider a one-dimensional array with exactly 1010 elements. Under C's zero-based indexing, the valid index range is

0≤i<10,0\le i<10,

that is, indices 00 through 99. You are given qq indices. For each one, determine whether accessing that array index is within the valid range.

Input

  • The first line contains qq.
  • The second line contains exactly qq integers i1,i2,…,iqi_1,i_2,\ldots,i_q.

Output

For each index, print VALID if 0≤i<100\le i<10; otherwise print INVALID. Print one result per line.

Subtasks

Subtask 1 (20 points): every index is in [0,9][0,9].

Subtask 2 (30 points): every index is in [−1,10][-1,10] and at least one index is invalid.

Subtask 3 (50 points): 1≤q≤10001\le q\le1000, −109≤ij≤109-10^9\le i_j\le10^9.

Examples

Input

7
-1 0 4 9 10 100 -5

Output

INVALID
VALID
VALID
VALID
INVALID
INVALID
INVALID

Explanation

Indices 0,4,90,4,9 are valid because they lie in [0,9][0,9]. Indices −1,10,100,−5-1,10,100,-5 are outside the range. The program prints one classification for each input index in order.