Given a positive integer n. The task is to find the nth telephone number.
The telephone numbers are also used to count the number of ways to place n rooks on an n x n chessboard in such a way that no two rooks attack each other and in such a way the configuration of the rooks is symmetric under a diagonal reflection of the board.
The first line of the input contains an integer T denoting the number of test cases. The description of each test case is as follows. Each test case contains a single line with one integer ' N ' for which you have to find the Nth telephone number.
For each N, output the Nth telephone number. Print under modulo 10^9 + 7.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.