There are 34 people in line to get into a theater. Admission cost is 5 dollars.

Of the 34 people, 28 have only a 5 dollar bill and 6 have only a 10 dollar bill.

To complicate matters, the ticket office has an empty cash register.

In how many ways can the people line up so that change is available when needed?

Example with 4 people, 2 (a and b) with 5's and 2 (c and d) with 10's:

a b c d

a b d c

b a c d

b a d c

a c b d

a d b c

b c a d

b d a c

So 8 ways...