A registration card number of PAT consists of 4 parts:
* the 1st letter represents the test level, namely, T for the top level, A for advance and B for basic;
* the 2nd - 4th digits are the test site number, ranged from 101 to 999;
* the 5th - 10th digits give the test date, in the form of yymmd
In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is super-simple, a URL consisting of the first 10-digit prime found in consecutive digits of the natural constant e. The person who could find this prime num
The “Hamilton cycle problem” is to find a simple cycle that contains every vertex in a graph. Such a cycle is called a “Hamiltonian cycle”. In this problem, you are supposed to tell if a given cycle is a Hamiltonian cycle.
Each input file contains one test case. For each case,