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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: E = None
        self.y: C = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

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

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

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

e = A("e")
b = B("b")
m = C("m")
f = D("f")
d = E("d")
i = B("i")
l = B("l")
n = C("n")

e.t = d
e.s = n
b.r = n
b.y = n
b.o = d
b.u = d
b.v = d
m.u = f
m.p = n
m.x = n
f.w = l
f.o = l
d.y = b
i.r = m
i.y = m
i.o = d
i.u = d
i.v = d
l.r = m
l.y = m
l.o = d
l.u = d
l.v = d
n.u = f
n.p = m
n.x = m
assert l.u.y.y.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: E = None
        self.y: C = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

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

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

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

e = A("e")
b = B("b")
m = C("m")
f = D("f")
d = E("d")
i = B("i")
l = B("l")
n = C("n")

e.t = d
e.s = n
b.r = n
b.y = n
b.o = d
b.u = d
b.v = d
m.u = f
m.p = n
m.x = n
f.w = l
f.o = l
d.y = b
i.r = m
i.y = m
i.o = d
i.u = d
i.v = d
l.r = m
l.y = m
l.o = d
l.u = d
l.v = d
n.u = f
n.p = m
n.x = m
assert l.u.y.y.p.u.txt == "f"