from sys import * n = int(argv[1]) known_for_tree = dict() for m in [1..n]: c = 0 for T0 in graphs.trees(m): for v in T0: # mark one vertex v by a triangle T = Graph(T0) T.add_edge(v,'A') T.add_edge(v,'B') T.add_edge('A','B') t = T.canonical_label().sparse6_string() if t in known_for_tree: continue KT = {t} if len(T) > 3: for v in T: if T.degree(v) == 1: T1 = Graph(T) T1.delete_vertex(v) t1 = T1.canonical_label().sparse6_string() KT |= known_for_tree[t1] known_for_tree[t] = KT if len(KT) > c: c = len(KT) print c