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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.o: D = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: F = None
        self.p: A = None
        self.s: F = None
        self.w: B = None
        self.t: A = None
        self.txt = txt

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

g = A("g")
j = B("j")
i = C("i")
l = D("l")
c = E("c")
k = F("k")
e = F("e")
f = B("f")

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.o: D = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: F = None
        self.p: A = None
        self.s: F = None
        self.w: B = None
        self.t: A = None
        self.txt = txt

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

g = A("g")
j = B("j")
i = C("i")
l = D("l")
c = E("c")
k = F("k")
e = F("e")
f = B("f")

g.o = j
g.v = c
g.z = f
j.t = i
i.y = j
i.t = g
i.p = g
i.o = l
l.q = i
c.y = f
c.r = e
c.s = e
c.p = g
c.t = g
c.w = j
k.p = c
k.z = i
e.p = c
e.z = i
f.t = i
assert l.q.p.o.t.o.txt == "l"