part2 (1398B)
1--- Part Two --- 2 3Now, you just need to figure out how many [1m[97morbital transfers[0m you (YOU) need to take to get to Santa 4(SAN). 5 6You start at the object YOU are orbiting; your destination is the object SAN is orbiting. An orbital 7transfer lets you move from any object to an object orbiting or orbited by that object. 8 9For example, suppose you have the following map: 10 11COM)B 12B)C 13C)D 14D)E 15E)F 16B)G 17G)H 18D)I 19E)J 20J)K 21K)L 22K)YOU 23I)SAN 24 25Visually, the above map of orbits looks like this: 26 27 [1m[97mYOU[0m 28 [1m[97m/[0m 29 G - H [1m[97mJ - K[0m - L 30 / [1m[97m/[0m 31COM - B - C - [1m[97mD - E[0m - F 32 [1m[97m\[0m 33 [1m[97mI - SAN[0m 34 35In this example, YOU are in orbit around K, and SAN is in orbit around I. To move from K to I, a 36minimum of 4 orbital transfers are required: 37 38 39 - K to J 40 41 - J to E 42 43 - E to D 44 45 - D to I 46 47 48Afterward, the map of orbits looks like this: 49 50 G - H J - K - L 51 / / 52COM - B - C - D - E - F 53 \ 54 I - SAN 55 [1m[97m\[0m 56 [1m[97mYOU[0m 57 58[1m[97mWhat is the minimum number of orbital transfers required[0m to move from the object YOU are orbiting to 59the object SAN is orbiting? (Between the objects they are orbiting - [1m[97mnot[0m between YOU and SAN.) 60 61