Ash is on his way to becoming the Pokemon Master. His pokemon can perform the following moves:  
- Tackle - Deal damage worth $X$ points  
- Grow - Increase damage by $Y$ points i.e. $X$ = $X$ + $Y$ 
But, it can only perform Grow first (0 or more times) and then tackle (0 or more) times after which it cannot perform Grow again.

That is, it cannot perform the Grow operation once it has performed the tackle operation.  
A pokemon can be caught only if it’s health is exactly 1. A wild pokemon has appeared and has health worth $H$ points. Find the minimum number of moves required to catch it or say that it is not possible.  

-----Input:-----
- 
The first line of the input consists of a single integer $T$ denoting the number of test cases.
- 
Each test case consists of 3 space-separated integers $H$, $X$ and $Y$.

-----Output:-----
- For each test case, print a single line containing one integer - the minimum number of moves required to catch the pokemon if it is possible to catch it else print -1.

-----Constraints-----
- 
1 <= $T$ <= 103
- 
1 <=  $X$, $Y$ < $H$ <= 109

-----Subtasks-----
Subtask #1 (30 points):
- 1 <=  $X$, $Y$ < $H$ <= 1000
Subtask #2 (70 points):
- Original Constraints

-----Sample Input:-----
2

101 10 10

11 3 3  

-----Sample Output:-----
6

-1  

-----EXPLANATION:-----
- 
Example Case 1:

Ash can make use of Grow once. So $X$ = 10 + 10 = 20

Then he can do Tackle 5 times to decrease $H$ to 1.

OR

Ash can make use of Grow 4 times. So $X$ = 10 + 4*10 = 50

Then he can do Tackle 2 times to decrease $H$ to 1.

Hence, a total of 6 moves are required either way which is minimum.  
- 
Example Case 2:

No matter how many times Ash uses Grow or Tackle, pokemon can never be caught.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = '# cook your dish here\nimport math  \n \ndef printDivisors(n,X,l) : \n    list = []   \n    for i in range(1, int(math.sqrt(n) + 1)) : \n        if (n % i == 0) : \n            if (n / i == i) : \n                list.append(i)\n                a=0\n            else :  \n                list.append(i)\n                list.append(int(n / i)) \n                       \n    for i in list[::-1] :\n        if(i-X>=0):\n            l.append(i)\n          \n\nT=int(input())\nfor _ in range(T):\n    H,X,Y=list(map(int,input().split()))\n    l=[]\n    printDivisors(H-1,X,l)\n    mv=2*H\n    for i in l:\n        a=(i-X)//Y\n        if(a*Y==(i-X)):\n            v=((H-1)//i)+a\n            if(v<mv):\n                mv=v\n\n    if(mv>H):\n        print(-1)\n\n    else:\n        print(mv)\n        \n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13265