For each integer k ≥ 1, we define an algorithm which associates to a partition whose maximal value is at most k a certain subset of all partitions. In the case when we begin with a partition λ which is square-bounded, i.e. λ = (λ 1 ≥ · · · ≥ λ k ) with λ 1 = k and λ k = 1, applying the algorithm times gives rise to a set whose cardinality is either the Catalan number c −k+1 (the self dual case) or twice that Catalan number. The algorithm defines a tree and we study the propagation of the tree, which is not in the isomorphism class of the usual Catalan tree. The algorithm can also be modified to produce a two-parameter family of sets and the resulting cardinalities of the sets are the ballot numbers. Finally, we give a conjecture on the rank of a particular module for the ring of symmetric functions in 2 + m variables.