Vasya has 30 rods of equal lengths. Each rod is painted in some color.
He is going to construct a dodecahedron using these rods as its edges.
He is interested in how many different dodecahedra he can obtain (Vasya
calls two dodecahedra equal if one of them can be obtained from the other
by a sequence of rotations).
Input
30 integers that are colors of the rods. The colors lie in range from 1 to 30.
The numbers are delimited with whitespaces.
Output
Output the number of different dodecahedra Vasya can construct.
Sample
input  output 

1 1 2 2 2 2 2 2 2 2
2 2 2 2 2 2 2 2 2 2
2 2 2 2 2 2 2 2 2 2
 11

Notes
Dodecahedron is a regular polyhedron with 20 vertices and 12 pentagonal faces.
Problem Author: Igor Chevdar
Problem Source: Ural SU Contest. Petrozavodsk Winter Session, January 2008