Recently a new building with a new layout was constructed in Monocarp's hometown. According to this new layout, the building consists of three types of apartments: three-room, five-room, and seven-room apartments. It's also known that each room of each apartment has exactly one window. In other words, a three-room apartment has three windows, a five-room — five windows, and a seven-room — seven windows.

Monocarp went around the building and counted $n$ windows. Now he is wondering, how many apartments of each type the building may have.

Unfortunately, Monocarp only recently has learned to count, so he is asking you to help him to calculate the possible quantities of three-room, five-room, and seven-room apartments in the building that has $n$ windows. If there are multiple answers, you can print any of them.

Here are some examples:

  if Monocarp has counted $30$ windows, there could have been $2$ three-room apartments, $2$ five-room apartments and $2$ seven-room apartments, since $2 \cdot 3 + 2 \cdot 5 + 2 \cdot 7 = 30$;  if Monocarp has counted $67$ windows, there could have been $7$ three-room apartments, $5$ five-room apartments and $3$ seven-room apartments, since $7 \cdot 3 + 5 \cdot 5 + 3 \cdot 7 = 67$;  if Monocarp has counted $4$ windows, he should have mistaken since no building with the aforementioned layout can have $4$ windows. 


-----Input-----

Th first line contains one integer $t$ ($1 \le t \le 1000$) — the number of test cases.

The only line of each test case contains one integer $n$ ($1 \le n \le 1000$) — the number of windows in the building.


-----Output-----

For each test case, if a building with the new layout and the given number of windows just can't exist, print $-1$.

Otherwise, print three non-negative integers — the possible number of three-room, five-room, and seven-room apartments. If there are multiple answers, print any of them.


-----Example-----
Input
4
30
67
4
14

Output
2 2 2
7 5 3
-1
0 0 2

Difficulty: interview

Starter code:

Solutions:
def solve():
    n = int(input())
    if n % 3 == 0:
        print(n//3,0,0)
        return 0
    if n % 3 == 1:
        if n < 7:
            print(-1)
        else:
            print((n-7)//3, 0, 1)
        return 0
    if n < 5:
        print(-1)
        return 0
    print((n-5)//3, 1, 0)
for i in range(int(input())):
    solve()

# map(int, input().split())
rw = int(input())
for wewq in range(rw):
    n = int(input())
    a = 0
    b = 0
    c = 0
    if n % 3 == 0:
        print(n // 3, 0, 0)
    elif n % 3 == 1:
        if n // 3 - 2 < 0:
            print(-1)
            continue
        print(n // 3 - 2, 0, 1)
    elif n % 3 == 2:
        if n // 3 - 1 < 0:
            print(-1)
            continue
        print(n // 3 - 1, 1, 0)



import sys
input = sys.stdin.readline

t = int(input())
for i in range(t):
    n = int(input())
    if n == 1 or n == 2 or n == 4:
        print(-1)
    else:
        if n% 3 == 2:
            print(n//3-1,1,0)
        elif n % 3==1:
            print(n//3-2,0,1)
        else:
            print(n//3,0,0)     

t=int(input())
for you in range(t):
    n=int(input())
    if(n==1 or n==2 or n==4):
        print(-1)
        continue
    if(n==3):
        print(1,0,0)
        continue
    z=n%3
    if(z==0):
        print(n//3,0,0)
    if(z==1):
        print((n-7)//3,0,1)
    if(z==2):
        print((n-5)//3,1,0)


for _ in range (int(input())):
    n=int(input())
    three=n//3
    five=0
    seven=0
    excess=n%3
    if excess==2:
        three-=1
        five=1
    elif excess==1:
        three-=2
        seven+=1
    if three<0:
        print(-1)
    else:
        print(three,five,seven)

import sys, math
import io, os
#data = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
#from itertools import permutations,combinations
def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var) : sys.stdout.write('\n'.join(map(str, var))+'\n')
def out(var) : sys.stdout.write(str(var)+'\n')
#from decimal import Decimal
#from fractions import Fraction
#sys.setrecursionlimit(100000)
INF = float('inf')
mod=10**9+7


for t in range(int(data())):
    n=int(data())
    k=n//3
    if n%3==2:
        if k<1:
            print(-1)
            continue
        print(k-1,1,0)
    elif n%3==1:
        if k<2:
            print(-1)
            continue
        print(k-2,0,1)
    else:
        print(k,0,0)

t = int(input())
for _ in range(t):
    n = int(input())
    #a = list(map(int, input().split()))
    if 1<=n<=2 or n==4:
        print(-1)
    elif n%3==0:
        print(n//3, 0, 0)
    elif n%3==1:
        print((n-7)//3, 0, 1)
    else:
        print((n-5)//3, 1, 0)

import math


t = int(input())

for q in range(t):
    n = int(input())
    if n % 3 == 0:
        print(n // 3, 0, 0)
    elif n % 3 == 1 and n > 4:
        print((n - 7) // 3, 0, 1)
    elif n % 3 == 2 and n > 2:
        print((n - 5) // 3, 1, 0)
    else:
        print(-1)
    
    
        
        


import sys
import math
from collections import defaultdict,deque

input = sys.stdin.readline
def inar():
    return [int(el) for el in input().split()]
def main():
    t=int(input())
    for _ in range(t):
        n=int(input())
        take=n//3
        if n%3==0:
            print(n//3,0,0)
        elif n%3==1:
            if (take-2)>=0:
                print(take-2,0,1)
            else:
                print(-1)
        else:
            if (take-1)>=0:
                print(take-1,1,0)
            else:
                print(-1)

def __starting_point():
    main()




__starting_point()