{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eThere’s an array that is generated by following rule.\u003cbr\u003e$h_0\u003d2,h_1\u003d3,h_2\u003d6,h_n\u003d4h_{n-1}+17h_{n-2}-12h_{n-3}-16$\u003cbr\u003eAnd let us define two arrays ${b_n} and {a_n}$ as below.\u003cbr\u003e$b_n\u003d3h_{n+1} h_n+9h_{n+1} h_{n-1}+9h_n^2+27h_n h_{n-1}-18h_{n+1}-126h_n-81h_{n-1}+192(n\u0026gt;0)$\u003cbr\u003e$a_n\u003db_n+4^n$\u003cbr\u003eNow, you have to print $\\left \\lfloor √(a_n ) \\right \\rfloor $ , n\u0026gt;1.\u003cbr\u003eYour answer could be very large so print the answer modular 1000000007.\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of input contains T (1 \u0026lt;\u003d T \u0026lt;\u003d 1000) , the number of test cases.\u003cbr\u003eEach test case contains one integer n (1 \u0026lt; n \u0026lt;\u003d $10^{15}$) in one line.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case print \u0026amp;#8970;√(a_n )\u0026amp;#8971; modular 1000000007."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n4\r\n7\r\n9\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1255\r\n324725\r\n13185773\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}