inefficient code to gen all perms of a string