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 = 'from sys import stdin\r\nfrom functools import reduce\r\n\r\ndef factors(n):    \r\n    return list(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))\r\n\r\nfor _ in range(int(stdin.readline())):\r\n    h, x, y = list(map(int, stdin.readline().split()))\r\n    arr = factors(h-1)\r\n    ans = 1000000001\r\n    cond = False\r\n    for i in range(len(arr)):\r\n        if arr[i]>=x:\r\n            m = arr[i]-x\r\n            if m%y == 0:\r\n                cond = True\r\n                ans = min(ans, m//y + (h-1)//arr[i])\r\n    if cond == True:\r\n        print(ans)\r\n    else:\r\n        print(-1)\r\n            \r\n            \r\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13453