Problem Statement | |||||||||||||
There are N cities in a country, numbered 0 to N-1. Each pair of cities is connected by a bidirectional road.
John plans to travel through the country using the following rules:
Return the number of paths he can choose, modulo 1,000,000,007. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | roads will contain between 2 and 50 elements, inclusive. | ||||||||||||
- | Each element of roads will contain n characters, where n is the number of elements in roads. | ||||||||||||
- | Each character in roads will be 'Y' or 'N'. | ||||||||||||
- | The i-th character in the i-th element of roads will be 'N'. | ||||||||||||
- | The j-th character in the i-th element of roads and the i-th character in the j-th element of roads will be equal. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
|