A Linear-Time Algorithm for Recognition of Catval Graphs