SP31279 AGPC01G - Eat Pray Love

Description

One of your friends was in relationship with multiple people at once and it didn’t end very well. Thus he/she chose the path of righteousness and decided to stay in only one relationship or stay single. But not only that, he/she became a motivational speaker and formed an organization to help people to walk through this path. N people joined his/her organization. He/She takes one person and he/she either pairs that person up with another person in a relationship or keeps that person single. Let’s assume that every person can be paired up with every other person. In how many ways he/she can do that?

Input Format

First line of input will be T (1

Output Format

For each test case print correct answer describe in the description. As, output can be large. Print it modulo 1000000007.