class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.q: A = None
        self.v: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

i.t = b
i.y = h
i.q = l
i.v = f
i.r = f
m.y = a
m.s = f
e.r = g
e.s = l
e.y = l
e.q = h
e.w = h
c.u = b
c.q = i
a.q = h
f.u = g
f.q = i
l.t = m
l.y = e
l.q = i
l.v = c
l.r = f
g.y = a
g.s = c
h.r = g
h.s = i
h.y = i
h.q = e
h.w = e
b.y = a
b.s = f
assert b.s.u.s.u.s.txt == "f"