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.

Vagesh Verma | 98 |

UrGuru | 98 |

chaolinyu | 84 |

prernaus24 | 83 |

devendrachoudhary5485 | 74 |

abducodes | 624 |

harshtyagi36 | 298 |

highway_to_hell | 252 |

rajeswarii | 248 |

arpit_anshuman | 240 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4567 |

Login to report an issue on this page.