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.

agness | 122 |

aman1931998 | 102 |

Survivor | 100 |

uchitnitk | 96 |

lonecoder | 95 |

KshatriyaYash | 1066 |

nikhil_sojan | 1032 |

lonecoder | 1030 |

mazumderrohit8 | 899 |

SumitSingh27 | 832 |

blackshadows | 5327 |

Ibrahim Nash | 5215 |

akhayrutdinov | 5111 |

mb1973 | 4492 |

Quandray | 4444 |

Login to report an issue on this page.