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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.o: C = None
        self.r: C = None
        self.z: C = None
        self.txt = txt

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

l = A("l")
b = B("b")
c = C("c")
e = D("e")
a = E("a")
j = A("j")

l.x = e
l.r = e
l.t = b
l.p = c
b.s = a
b.r = c
b.o = c
c.s = a
e.w = b
e.q = a
e.o = c
e.r = c
e.z = c
a.v = b
a.u = b
a.y = b
j.x = e
j.r = e
j.t = b
j.p = c
assert l.x.o.s.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: B = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.o: C = None
        self.r: C = None
        self.z: C = None
        self.txt = txt

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

l = A("l")
b = B("b")
c = C("c")
e = D("e")
a = E("a")
j = A("j")

l.x = e
l.r = e
l.t = b
l.p = c
b.s = a
b.r = c
b.o = c
c.s = a
e.w = b
e.q = a
e.o = c
e.r = c
e.z = c
a.v = b
a.u = b
a.y = b
j.x = e
j.r = e
j.t = b
j.p = c
assert l.x.o.s.v.s.txt == "a"