You are given N balls numbered from 1 to N and there are N baskets numbered from 1 to N in front of you, the ‘i’th basket is meant for the ‘i’th ball. The task is to calculate the number of ways in which none of the balls goes into their respective basket.

**Input:** The first line of input contains a single integer T denoting the number of test cases. Then** **T test cases follow. Each test case consist of a single line containing an integer N.

**Output: **Corresponding to each test case, print the desired output in a new line. Since the answer can be large, print it modulo **10 ^{9} + 7.**

**Constraints :**

1 ≤ T ≤ 100

1 ≤ N ≤ 10^{5}

**Examples
Input :**

2

2

3

**Output :**

1

2

**Explanation :** In Second test case there are two ways in which no ball goes into respective basket.

**1.** Ball 1 will go in basket 2 , ball 2 will go in basket 3 and ball 3 will go into basket 1.

**2.** Ball 1 will go in basket 3 , ball 2 will go in basket 1 and ball 3 will go into basket 2.

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.

jhasaurabh312 | 138 |

Aaaaarohiiii | 136 |

Harsha_kunchala | 128 |

tushki | 124 |

RajaRajput | 117 |

ARUN_PUNDIR | 617 |

manishgupta8497 | 607 |

Abhimanyu_kumar | 559 |

KhyatiSoneji | 501 |

Aman___Jain | 496 |

blackshadows | 5335 |

Ibrahim Nash | 5223 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4567 |

Login to report an issue on this page.