class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: B = None
        self.u: C = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

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

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

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

c = A("c")
h = B("h")
j = C("j")
e = D("e")
n = E("n")
d = B("d")
i = A("i")
b = D("b")

c.y = h
c.s = h
c.t = h
c.u = j
c.q = j
h.u = e
j.s = b
j.t = n
e.t = b
e.o = b
n.y = e
n.w = i
n.v = i
n.s = j
d.u = b
i.y = d
i.t = d
i.s = h
i.u = j
i.q = j
b.t = e
b.o = e
assert c.t.u.o.o.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: B = None
        self.u: C = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

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

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

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

c = A("c")
h = B("h")
j = C("j")
e = D("e")
n = E("n")
d = B("d")
i = A("i")
b = D("b")

c.y = h
c.s = h
c.t = h
c.u = j
c.q = j
h.u = e
j.s = b
j.t = n
e.t = b
e.o = b
n.y = e
n.w = i
n.v = i
n.s = j
d.u = b
i.y = d
i.t = d
i.s = h
i.u = j
i.q = j
b.t = e
b.o = e
assert c.t.u.o.o.o.t.txt == "e"