Can someone please explain TWOFL i am not getting it?

c-plus-plus
graph-theory

#1

https://www.codechef.com/problems/TWOFL


#2

Question is quite clear…u have to find a path such that it contains only two type of values