Backward and Forward

Problem Name:
Backward and Forward
Site:CodeForces
Links:
Tags:
Problem setters: