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

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

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

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

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

c = A("c")
a = B("a")
l = C("l")
h = D("h")
e = E("e")
k = D("k")
i = E("i")
j = A("j")
d = C("d")

c.t = e
c.u = a
c.p = a
c.y = a
c.o = i
a.o = c
a.y = k
a.w = e
l.p = a
l.o = h
l.t = i
h.x = e
h.s = k
e.x = i
e.p = h
e.u = a
k.x = e
k.s = h
i.x = e
i.p = h
i.u = a
j.t = i
j.u = a
j.p = a
j.y = a
j.o = e
d.p = a
d.o = k
d.t = i
assert a.w.x.p.s.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.p: B = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

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

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

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

c = A("c")
a = B("a")
l = C("l")
h = D("h")
e = E("e")
k = D("k")
i = E("i")
j = A("j")
d = C("d")

c.t = e
c.u = a
c.p = a
c.y = a
c.o = i
a.o = c
a.y = k
a.w = e
l.p = a
l.o = h
l.t = i
h.x = e
h.s = k
e.x = i
e.p = h
e.u = a
k.x = e
k.s = h
i.x = e
i.p = h
i.u = a
j.t = i
j.u = a
j.p = a
j.y = a
j.o = e
d.p = a
d.o = k
d.t = i
assert a.w.x.p.s.x.x.txt == "i"