SP26845 INS16H - Daenerys wants to Conquer

Description

``` With full zeal, Daenerys Targaryen is looking to conquer the seven kingdoms. In need of wise commanders, she wants them to solve the below problem: Given the following function F and an integer N find the smallest integer x satisfying F(x) = N.   If no such x exists, print “-1”. (without quotes) Input Format: The first line contains one integer T, the number of times she gives you the problem. T lines follow, each containing a single integer N. Output Format:Print answer for each problem in a separate line. Constraints:1 ``` ``` ```

Input Format

N/A

Output Format

N/A