solved a new problem: three way communication
http://www.codechef.com/problems/COMM3