An island has a set of towns and specific roads that lead from one town to another. A town can have any number of roads connecting it to other towns, but there can never be two roads that directly connect the same two towns.
Every town has at least one road connecting to another town.
The names of the towns will be strings entirely composed of alphabetic characters composed of no more than 20 characters. There will always be between 5 and 100 towns on the island. Your program should output SAFE on a single line if it is possible to travel from an uninfected town to every other uninfected town without passing through the infected town.