Solving a directed percolation inverse problem