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.
#!/usr/bin/python
"Solve the Rescue problem at CodeChef"
def main():
 testcases = int(raw_input())
 for testcase in xrange(testcases):
  capacity, men, women, children = map(int, raw_input().split())
  max_women = min(women, (men << 1))
  max_children = min((men + max_women) << 2, int(capacity * 0.8))
  children_rescued = min(children, max_children)
  adults_rescued = min(men + max_women, capacity - children_rescued)
  women_rescued = min(max_women, int(adults_rescued * 0.66666667))
  men_rescued = adults_rescued - women_rescued
  print men_rescued, women_rescued, children_rescued
main()