The Titanic ship is sinking. The nearest ship has answered the SOS call, and come to rescue the people. Everyone is anxious to get to safety. Unfortunately, the new ship may not have enough room to take everyone to safe land. This adds to the anxiety of people. 

To avoid stampede, there has to be some rescue plan. You are made incharge of this. You have to make sure that as many people are safe as possible. Given the capacity of the ship, that is, the number of people that can board the ship, you have to calculate how many men, women and children can be sent to safety.

The following rules apply:

* The foremost priority is safety for children, but there must be atleast one adult (a man or a woman) for every four  children sent to the rescue ship. For upto four children, one adult, for five to eight children, 2 adults, and so on.

* Next priority is for women, but there must be at least one man for every two women. For upto two women, one man, for three to four women, two men, and so on.

Input
First line contains the number of test cases (t less than 10000)
The next t lines contain four integers (each between 1 to 10000 inclusive) each separated by a single space.
The integers represent the capacity of the rescue ship, number of men on TITANIC, number of women and number of children, in this order.

Output
Display t lines, each line has three space separated integers denoting the number of men, women and children put to safety, in this order.

Example

Input:
3
17 5 10 19
18 2 6 10
20 5 2 23

Output:
2 2 13
2 4 10
2 2 16


Explanation:
Explanation for case 2: Since only 2 men are present, the number of women can not be more than 4.
def process(R, M, W, C):
    C  = min([C,4*R/5,(M+W)*4,(M+2*M)*4])
    R -= C
    W  = min([W,2*R/3,(M)*2])
    R -= W
    M  = min([M,1*R/1,(M)*1])
    return '%s %s %s' % (M,W,C)

def main():
    T = int(raw_input())
    for t in xrange(T):
        R, M, W, C = map(int, raw_input().split())
        print process(R, M, W, C)

main()