Chef has arrived in Dagobah to meet with Yoda to study cooking. Yoda is a very busy cook and he doesn't want to spend time with losers. So he challenges the Chef to a series of games, and agrees to teach the Chef if Chef can win at least P of the games. The total number of games is K. The games will be played on a chessboard of size N*M. That is, it has N rows, each of which has M squares. At the beginning of the game, a coin is on square (1, 1), which corresponds to the top-left corner, and every other square is empty. At every step, Yoda and Chef have to move the coin on the chessboard. The player who cannot make a move loses. Chef makes the first move. They can't move the coin to a square where it had been placed sometime before in the game, and they can't move outside chessboard.

In this game, there are two different sets of rules according to which the game can be played:

-from (x, y) player can move coin to (x+1, y), (x-1, y), (x, y+1), (x, y-1) in his turn, if they are valid squares.

-from (x, y) player can move coin to (x+1, y+1), (x-1, y-1), (x-1, y+1), (x+1, y-1) in his turn, if they are valid squares.

Before every game, the Power of the kitchen chooses one among the two sets of rules with equal probability of 0.5, and the game will be played according to those rules. Chef and Yoda are very wise, therefore they play optimally. You have to calculate the probability that Yoda will teach Chef.

-----Input-----

Input begins with an integer T, the number of test cases

Each test case begins with 4 integers N, M, P, K.

-----Output-----

For each test case, output a line containing the answer for task. The output must have an absolute error at most 0.000001 (10-6).  

-----Constraints and Subtasks-----
-  1 ≤ T ≤ 50 
-  1 ≤ K 

Subtask 1 : 10 points 

-  2 ≤ N, M ≤ 5 
-  0 ≤ P ≤ K ≤ 5 

Subtusk 2 : 10 points 
-  2 ≤ N, M ≤ 10 
-  0 ≤ P ≤ K ≤ 10^3 

Subtusk 3 : 20 points 
-  2 ≤ N, M ≤ 100 
-  0 ≤ P ≤ K ≤ 10^3 

Subtusk 4 : 60 points
-  2 ≤ N, M ≤ 100 
-  0 ≤ P ≤ K ≤ 10^6 

-----Example-----
Input:
2
2 3 2 3
2 2 5 5
Output:
0.500000
1.000000

```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 = 'import math\n\ndp = []\ndp.append(0)\nfor i in range(1,1000005):\n\tdp.append(math.log(i) + dp[i-1])\n\nt = int(input())\nfor i in range(t):\n\tn,m,p,k = input().split()\n\tn = int(n)\n\tm = int(m)\n\tp = int(p)\n\tk = int(k)\n\n\tif p==10 or (n%2==0 and m%2==0):\n\t\tans = 1.0\n\t\tprint(ans)\n\telif n%2==1 and m%2==1:\n\t\tans=0.0\n\t\tprint(ans)\n\telse:\n\t\tP = 0\n\t\tkln2 = k*math.log(2)\n\t\tfor i in range(p, k+1):\n\t\t\tlnPi = dp[k] - dp[i] - dp[k-i] - kln2\n\t\t\tPi = pow(math.e, lnPi)\n\t\t\tP += Pi\n\t\tprint(P)\n\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 32462389