Find the Permutations

UVA - 11077