working solution for finding subsets of size 3 of given array
note that level > i is key, = to lead to repeated chars