Bessie and the cows are playing with sequences and need your help. They start with a sequence, initially containing just the number 0, and perform n operations. Each operation is one of the following:  Add the integer x_{i} to the first a_{i} elements of the sequence.  Append an integer k_{i} to the end of the sequence. (And hence the size of the sequence increases by 1)  Remove the last element of the sequence. So, the size of the sequence decreases by one. Note, that this operation can only be done if there are at least two elements in the sequence. 

After each operation, the cows would like to know the average of all the numbers in the sequence. Help them!


-----Input-----

The first line contains a single integer n (1 ≤ n ≤ 2·10^5) — the number of operations. The next n lines describe the operations. Each line will start with an integer t_{i} (1 ≤ t_{i} ≤ 3), denoting the type of the operation (see above). If t_{i} = 1, it will be followed by two integers a_{i}, x_{i} (|x_{i}| ≤ 10^3; 1 ≤ a_{i}). If t_{i} = 2, it will be followed by a single integer k_{i} (|k_{i}| ≤ 10^3). If t_{i} = 3, it will not be followed by anything.

It is guaranteed that all operations are correct (don't touch nonexistent elements) and that there will always be at least one element in the sequence.


-----Output-----

Output n lines each containing the average of the numbers in the sequence after the corresponding operation.

The answer will be considered correct if its absolute or relative error doesn't exceed 10^{ - 6}.


-----Examples-----
Input
5
2 1
3
2 3
2 1
3

Output
0.500000
0.000000
1.500000
1.333333
1.500000

Input
6
2 1
1 2 20
2 2
1 2 -3
3
3

Output
0.500000
20.500000
14.333333
12.333333
17.500000
17.000000



-----Note-----

In the second sample, the sequence becomes $\{0 \} \rightarrow \{0,1 \} \rightarrow \{20,21 \} \rightarrow \{20,21,2 \} \rightarrow \{17,18,2 \} \rightarrow \{17,18 \} \rightarrow \{17 \}$

```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 = '# Target - Expert on CF\n# Be Humblefool\n\nimport sys\n\ninf = float("inf")\n# sys.setrecursionlimit(1000000)\n\n# abc=\'abcdefghijklmnopqrstuvwxyz\'\n# abd={\'a\': 0, \'b\': 1, \'c\': 2, \'d\': 3, \'e\': 4, \'f\': 5, \'g\': 6, \'h\': 7, \'i\': 8, \'j\': 9, \'k\': 10, \'l\': 11, \'m\': 12, \'n\': 13, \'o\': 14, \'p\': 15, \'q\': 16, \'r\': 17, \'s\': 18, \'t\': 19, \'u\': 20, \'v\': 21, \'w\': 22, \'x\': 23, \'y\': 24, \'z\': 25}\nmod, MOD = 1000000007, 998244353\n# words = {1:\'one\',2:\'two\',3:\'three\',4:\'four\',5:\'five\',6:\'six\',7:\'seven\',8:\'eight\',9:\'nine\',10:\'ten\',11:\'eleven\',12:\'twelve\',13:\'thirteen\',14:\'fourteen\',15:\'quarter\',16:\'sixteen\',17:\'seventeen\',18:\'eighteen\',19:\'nineteen\',20:\'twenty\',21:\'twenty one\',22:\'twenty two\',23:\'twenty three\',24:\'twenty four\',25:\'twenty five\',26:\'twenty six\',27:\'twenty seven\',28:\'twenty eight\',29:\'twenty nine\',30:\'half\'}\n# vow=[\'a\',\'e\',\'i\',\'o\',\'u\']\n# dx,dy=[0,1,0,-1],[1,0,-1,0]\n\n# import random\n# from collections import deque, Counter, OrderedDict,defaultdict\n# from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace\n# from math import ceil,floor,log,sqrt,factorial,pi,gcd\n# from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right\n\ndef get_array(): return list(map(int, sys.stdin.readline().strip().split()))\ndef get_ints(): return map(int, sys.stdin.readline().strip().split())\ndef input(): return sys.stdin.readline().strip()\n\nArr = [0]\ndp = [0]\nprev_sum = 0\nprev_length = 1\nn = int(input())\nwhile n:\n    arr = get_array()\n    if len(arr)==2:\n        number = arr[1]\n        Arr.append(number)\n        dp.append(0)\n        ans = (prev_sum+number)/(prev_length+1)\n        print(ans)\n        prev_length+=1\n        prev_sum+=number\n    elif len(arr)==3:\n        a,x = arr[1],arr[2]\n        dp[a-1]+=x\n        ans = (prev_sum + a*x)/(prev_length)\n        print(ans)\n        prev_sum+=a*x\n    else:\n        ans = (prev_sum - (Arr[-1]+dp[-1]))/(prev_length - 1)\n        print(ans)\n        prev_sum-=(Arr[-1]+dp[-1])\n        prev_length-=1\n        dp[-2]+=dp[-1]\n        Arr.pop()\n        dp.pop()\n    n-=1'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14415