Minimum Final Exam Score

No attempts yetTime limit1sMemory limit256 MB

Problem

You are about to take the final exam for Basket Weaving 101, and you want to know the lowest score on that exam that still leaves you with a course grade of at least 90. The course grade is a weighted average of four parts. The project counts for 15%, the term paper for 20%, the midterm exam for 25%, and the final exam for 40%.

Given the project score, the term paper score, and the midterm exam score, find the smallest integer final exam score that brings the course grade to 90 or above. A final exam score is an integer from 0 to 100. If no score in that range reaches a course grade of 90, print impossible.

In other words, with a project score pp, a term paper score ww, a midterm score mm, and a final exam score ff, find the smallest integer ff that satisfies 0.15p+0.20w+0.25m+0.40f900.15p + 0.20w + 0.25m + 0.40f \ge 90.

Input

The first line contains the number of test cases TT (1T10001 \le T \le 1000).

Each of the next TT lines contains the project score, the term paper score, and the midterm exam score, in that order. Every score is an integer from 0 to 100.

Output

For each test case, print on its own line the smallest integer final exam score that gives a course grade of at least 90. If no score from 0 to 100 reaches a course grade of 90, print impossible on that line instead.