Drinking tea and other liquids (purely for the sake of conspiracy) is a vital part of the sittings of the Secret Committee. Hot tea is diluted with cold milk. Of course, everyone wants his tea to reach the perfect temperature as fast as possible. The temperature of the mixture is measured according to the exponential law:
,
where T(t) ―is the temperature at the moment of time t,
T_1 ― temperature of the mixture at the initial moment,
T_0 ― ambient temperature,
k ― a certain static coefficient.
When two liquids are mixed with the masses m_1 and m_2 and temperatures T_1 and T_2 respectively the result is a mixture with the temperature
Let us consider that all liquids at the tea party have the same specific thermal capacity. The temperature of the first liquid begins to change according to the exponential law straight away, and at any moment of time we can mix it instantly with the second liquid, which has a stable temperature T_2, after which the temperature of the resulting liquid begins to change according to the same law with the same coefficient k and new temperature T_1^{′} calculated from the formula of temperatures of mixed liquids.
We must calculate the minimal time necessary to achieve the desired temperature of the resulting mixture.
The first line of the input file must contain an integer N ― the number of tests. Each line of the following N lines contains seven integers T_0, T_1, T_2, m_1, m_2, T_opt, k. T_0, T_1, T_2, T_opt are the temperatures of the ambience, of the first and second liquids and the desired temperature, (–273 < T_0, T_1,T_2, T_opt ≤ 1000), m_1 and m_2 are the masses of the first and second liquids (0 ≤ m_1, m_2 ≤ 1000, m_1+m_2 > 0), and k is the coefficient for the speed of temperature change (1 ≤ k ≤ 1000).
Each of N lines according to the sequence of data in the input file must contain a single real number ― the minimal time necessary to achieve the desired temperature calculated with a relative or absolute error margin not exceeding 10^{−8} or the message Impossible, if the desired temperature cannot be achieved.