Text this: Building merger trees from cosmological N-body simulations