Chef will not be able to attend the birthday of his best friend Rock. He promised Rock that this will not be the case on his half birthday. To keep his promise Chef must know Rock’s next half birthday accurately. Being busy, he is assigning this work to you.
Half birthday is the day that occurs exactly between two subsequent birthdays. 
You will be provided with Rock’s birthdate and birth month, you will have to figure out his half birthday.
$Note$: Consider every year to be a leap year and all months are displayed in lowercase English characters.

-----Input:-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. 
- The description of each of the $T$ test cases contains an integer $d$ followed by a string, denoting month $m$.
- Here $d$ denotes day of a month and $m$ denotes the month of a year respectively.

-----Output:-----
For each test case print an integer $d1$ followed by a string, denoting month $m1$, which overall denotes date and month of Rock’s half birthday.

-----Constraints:-----
- $1 \leq T \leq 10^5$
- $1 \leq d , d1 \leq 31$
- $january \leq m , m1 \leq december$

-----Sample Input:-----
3
15 january
31 august
10 october

-----Sample Output:-----
16 july
1 march
10 april

```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 = 'for t in range(int(input())):\n a=input().split()\n n,month=int(a[0]),a[1]\n if month=="january":\n  d=n\n elif month=="february":\n  d=n+31\n elif month=="march":\n  d=n+60\n elif month=="april":\n  d=n+91\n elif month=="may":\n  d=n+121\n elif month=="june":\n  d=n+152\n elif month=="july":\n  d=n+182\n elif month=="august":\n  d=n+213\n elif month=="september":\n  d=n+244\n elif month=="october":\n  d=n+274\n elif month=="november":\n  d=n+305\n else:\n  m=12\n  d=n+335\n d=(d+183)%366\n if d==0:\n  d=366\n if d<=31:\n  print(d,"january")\n elif d<=60:\n  print(d-31,"february")\n elif d<=91:\n  print(d-60,"march")\n elif d<=121:\n  print(d-91,"april")\n elif d<=152:\n  print(d-121,"may")\n elif d<=182:\n  print(d-152,"june")\n elif d<=213:\n  print(d-182,"july")\n elif d<=244:\n  print(d-213,"august")\n elif d<=274:\n  print(d-244,"september")\n elif d<=305:\n  print(d-274,"october")\n elif d<=335:\n  print(d-305,"november")\n else:\n  print(d-335,"december")'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13727