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

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

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

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

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

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

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

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

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

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

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

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

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