class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: E = None
        self.y: D = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: E = None
        self.z: B = None
        self.o: C = None
        self.u: A = None
        self.txt = txt

e = A("e")
j = B("j")
m = C("m")
k = D("k")
h = E("h")
l = E("l")
c = C("c")

e.p = k
e.y = k
e.z = k
e.w = h
e.o = l
j.x = k
m.u = l
m.p = j
m.t = j
m.v = j
k.p = j
k.x = j
h.s = e
h.u = e
h.q = l
h.z = j
h.o = c
l.s = e
l.u = e
l.q = h
l.z = j
l.o = c
c.u = h
c.p = j
c.t = j
c.v = j
assert c.t.x.p.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: E = None
        self.y: D = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: E = None
        self.z: B = None
        self.o: C = None
        self.u: A = None
        self.txt = txt

e = A("e")
j = B("j")
m = C("m")
k = D("k")
h = E("h")
l = E("l")
c = C("c")

e.p = k
e.y = k
e.z = k
e.w = h
e.o = l
j.x = k
m.u = l
m.p = j
m.t = j
m.v = j
k.p = j
k.x = j
h.s = e
h.u = e
h.q = l
h.z = j
h.o = c
l.s = e
l.u = e
l.q = h
l.z = j
l.o = c
c.u = h
c.p = j
c.t = j
c.v = j
assert c.t.x.p.x.x.txt == "j"