Itinerary is:
Osaka 30/11/2015 - 4/12/2015
Kyoto 4/12/2015 - 7/12/15
Hakuba 7/12/2015 - 13/12/2015
Which trains do I take and what pass should I buy. Also will I make it back to Osaka on the 13th for an evening flight if I leave Hakuba on the 13th or do I need to leave the night before.