Problem: Yes, you read it right - Little Jhool is back, but no, he's not over his break up, still. And he's sad, broken and depressed; thus, he decided to visit a psychologist. She tells him to think about his pleasant memories of childhood, and stay busy so as to not miss his ex-girlfriend.

She asks him about his favorite memories from childhood, and being the genius Mathematician Little Jhool is, he remembered that solving Mathematics problem given to him by his teacher was his favorite memory.

He had two types of notebooks, when he was a kid.
10 problems could be solved in one page, in the first notebook.
12 problems could be solved in one page, in the second notebook.

Little Jhool remembered how in order to maintain symmetry, if he was given with n problems in total to solve, he tore out pages from both notebooks, so no space was wasted. EVER!

But, now he's unable to solve his own problem because of his depression, and for the exercise of the week, he has to answer the queries asked by his psychologist.

Given n number of questions, print the minimum number of pages he needs to tear out from the combination of both the notebooks, so that no space is wasted.

Input Format:
The first line will contain t - number of test cases.

The second will contain an integer n - number of questions.

Output Format:
Corresponding to the input, print the minimum number of pages Little Jhool needs to tear out from the combination of both the notebooks. If it is NOT possible, print  "-1".

Constraints:  
1 ≤ t  ≤ 100  
1 ≤ n ≤ 113 

SAMPLE INPUT
2
23
32

SAMPLE OUTPUT
-1
3

Explanation

For 32: 2 pages from the notebook, where 10 can be solved; 1 page from the notebook, where 12 can be solved.

Solution (in PYTHON):

Solution:
cases = int(input())

l = [int(input()) for x in range(cases)]

def as_sum_of(k, m, n, memo={}):
    if k == m or k == n:
        return 1
    
    elif k < m and k < n:
        return float('inf')

    elif k in memo:
        return memo[k]
    
    else:
        least = float('inf')
        for x in range(2, k//2+1):
            req = as_sum_of(x, m, n, memo) + as_sum_of(k - x, m, n, memo)
            if req < least:
                least = req
        memo[k] = least
        return memo[k]

for num in l:
    if num % 2 == 1:
        print(-1)
    else:
        ans = as_sum_of(num, 10, 12)
        if ans != float('inf'):
            print(ans)
        else:
            print(-1)