A simple solution for a train commuting problem.