Problem Statement  
Petya likes sequences. He has an infinite sequence A[] with the following properties:
 
Definition  
 
Constraints  
  A will contain between 1 and 7 elements, inclusive.  
  B will contain between 1 and 50 elements, inclusive.  
  Each element of A will be between 0 and 9, inclusive.  
  Each element of B will be between 0 and 9, inclusive.  
Examples  
0)  
 
1)  
 
2)  
 
3)  
