# Is it a uniform polyhedron?

## Python 3, 190 bytes

```
def f(F):s="".join(hex(k)[2]for k in F);F[1:]in[[4,4],[3]*3]or{s,s[::-1]}&{*"555 333 366 388 3aa 466 566 468 46a 3434 3444 3454 3535 33333 33334 33335".split()}and max(F)<16or f(F[1:]+F[:1])
```

Try it online!

Takes input as a list of integers representing the vertex figure. The function errors (`RecursionError`

) if the vertex figure is *not* a uniform polyhedron, otherwise there is no error.

I tried several schemes of organizing the finite classes into a smart way that takes advantage of patterns, but hardcoding all possibilities reigned superior since it is a relatively small set.

### Explanation

```
def f(F):
# F is a rotation of the input vertex figure; initially is the input vertex figure
# Convert to string for easier comparison later in the code
s="".join(hex(k)[2]for k in F)
# Test true if the permutation is N.4.4.4 or N.3.3.3
(F[1:]in[[4,4],[3]*3]or
# Test truthy if permutation (or its reverse) is in
# 3.3.3, 3.6.6, 3.8.8, 3.10.10, 4.6.6, 5.6.6, 4.6.8, 4.6.10,
# 3.3.3.N, 3.4.3.4, 3.4.4.4, 3.4.5.4, 3.5.3.5
# 3.3.3.3.3, 3.3.3.3.4, 3.3.3.3.5
{s,s[::-1]}&{*"555 333 366 388 3aa 466 566 468 46a 3434 3444 3454 3535 33333 33334 33335".split()}
# Numbers greater than 15 would convert into the most-significant hexit when converted to a string,
# causing 0x43 to match the same as 0x4,
# so we need to check that none of this happened if we want a bugfree string search
and max(F)<16
# If we tested truthy, then terminate
# Otherwise, recurse with the vertex figure cyclically rotated left one
or f(F[1:]+F[:1]))
```