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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: C = None
        self.t: C = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: C = None
        self.t: C = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

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

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