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\ntry:\n    from functools import reduce\n\n    def factors(n):    \n        return set(reduce(list.__add__, \n                    ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))\n    b = ()\n    test = int(input())\n    for i in range (test):\n        flag = 0\n        move = 1000\n        h , x , y = list(map(int,input().split(\' \')))\n        b = factors(h-1)\n        h -= 1\n        if(h == x):\n            print("0")\n            move = 999\n        else:\n            for j in b:\n                if(j >= x):\n                    if(j==x ):\n                        flag = 1 \n                        if(move > h//j):\n                            move = h//j\n                    elif((j-x)%y == 0 ):\n                        flag = 1\n                        if(move > ((j-x)//y + h/j )):\n                            move = ((j-x)//y + h/j )\n                    \n                    \n            if(flag == 0):\n                print("-1")\n            else:\n                print(int(move%((10**9)+7)))\n                \n                \nexcept EOFError:\n\tpass'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13445