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.

sabka_din_aayega | 317 |

maggiiiii | 248 |

thanuvinu94 | 211 |

Savage_19 | 206 |

Anugrah_kumar | 172 |

Bishnu Dev Panda | 803 |

sabka_din_aayega | 628 |

Anugrah_kumar | 562 |

okayboss | 561 |

maggiiiii | 531 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4925 |

Quandray | 4547 |

Login to report an issue on this page.