import sys read=sys.stdin.buffer.read readline=sys.stdin.buffer.readline readlines=sys.stdin.buffer.readlines import numpy as np mat=np.array([[0]*6 for i in range(6)], dtype=np.float64) for i in range(6): mat[0][i]=1.0/6.0 for i in range(5): mat[i+1][i]=1.0 t=int(readline()) matps=[np.identity(6) for i in range(60)] matps[0]=mat for i in range(1, 60): matps[i]=np.dot(matps[i-1], matps[i-1]) for _ in range(t): n=int(readline()) matp=np.identity(6) for j in range(60): if n&(1<