class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.s: F = None
        self.y: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.u: E = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

e = A("e")
n = B("n")
j = C("j")
i = D("i")
m = E("m")
g = F("g")
k = D("k")
d = A("d")

e.z = d
e.v = m
e.q = n
n.o = j
j.w = d
j.t = e
j.y = e
j.s = g
j.o = i
i.r = g
m.o = n
g.z = j
g.p = e
g.u = m
g.o = m
g.w = m
k.r = g
d.z = e
d.v = m
d.q = n
assert e.v.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.s: F = None
        self.y: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.u: E = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

e = A("e")
n = B("n")
j = C("j")
i = D("i")
m = E("m")
g = F("g")
k = D("k")
d = A("d")

e.z = d
e.v = m
e.q = n
n.o = j
j.w = d
j.t = e
j.y = e
j.s = g
j.o = i
i.r = g
m.o = n
g.z = j
g.p = e
g.u = m
g.o = m
g.w = m
k.r = g
d.z = e
d.v = m
d.q = n
assert e.v.o.o.txt == "j"