Under construction

Still being built. Things may change

Quadratic equation

Interview

Time limit2sMemory limit256 MB

Summary
Given a nonzero integer Y, output nonzero integer coefficients A, B, C with absolute value at most 10^6 such that A*Y^2 + B*Y + C = 0.
Level

Easy3 of 10

Topics
Math, Implementation, Brute force
Solved
No attempts yet

Problem

Ted has just been accepted to the university after passing the exams successfully. While preparing for the exams, Ted solved several thousand similar problems. For instance, he solved quadratic equations over and over. Now that the exams are over, he can do anything he likes, so he has decided to make up his own problems. Ted wonders why one always has to find the roots of an equation, and not the other way around: find an equation for a root. First, he decided to experiment with his favorite type of equation since the ninth grade, the quadratic equation. But he ran into a new problem: this task is not typical, and he does not know enough to solve it.

Help Ted solve this new task!

Input

The first line of the input file contains an integer TT, the number of test cases (1≤T≤1001 \le T \le 100). It is followed by TT lines, one per test case.

Each line contains one non-zero integer YY, the root of a quadratic equation (1≤∣Y∣≤1061 \le |Y| \le 10^6).

Output

The output file must contain TT lines, and the ii-th line must hold the answer to the ii-th test case. The answer must contain three space-separated integers AiA_i, BiB_i, CiC_i such that the ii-th input number is a root of the quadratic equation AiX2+BiX+Ci=0A_iX^2+B_iX+C_i = 0.

All coefficients must be non-zero and not greater than 10610^6 in absolute value. If the required equation is not unique, print the coefficients of any one of them. It is guaranteed that at least one equation exists in each case.

Examples1

  1. Example 1

    Input
    2
    1
    -2
    
    Expected output
    2 -3 1
    3 2 -8