}
public abstract class TravelingTournamentInputBuilder extends TxtInputBuilder {
public Solution readSolution() throws IOException {
TravelingTournament travelingTournament = new TravelingTournament();
travelingTournament.setId(0L);
int n = readN();
List<Team> teamList = readTeamList(n);
travelingTournament.setTeamList(teamList);
List<Day> dayList = constructDayList(n);
travelingTournament.setDayList(dayList);
List<List<Integer>> outerDistanceList = readOuterDistanceList();
List<Match> matchList = constructMatchListAndSetDistancesInTeamList(teamList, outerDistanceList);
travelingTournament.setMatchList(matchList);
initializeMatchDays(travelingTournament);
return travelingTournament;
}