class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: D = None
        self.w: D = None
        self.t: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

f = A("f")
n = B("n")
c = C("c")
l = D("l")
a = E("a")
h = D("h")
e = D("e")

f.r = l
f.u = l
f.w = l
f.z = l
f.t = n
n.u = a
n.o = h
c.s = a
c.w = a
c.y = f
c.p = l
c.r = n
l.y = c
l.w = c
l.x = f
l.v = h
a.t = l
a.y = e
a.o = f
a.p = f
a.z = h
h.y = c
h.w = c
h.x = f
h.v = l
e.y = c
e.w = c
e.x = f
e.v = l
assert e.w.y.t.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: D = None
        self.w: D = None
        self.t: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

f = A("f")
n = B("n")
c = C("c")
l = D("l")
a = E("a")
h = D("h")
e = D("e")

f.r = l
f.u = l
f.w = l
f.z = l
f.t = n
n.u = a
n.o = h
c.s = a
c.w = a
c.y = f
c.p = l
c.r = n
l.y = c
l.w = c
l.x = f
l.v = h
a.t = l
a.y = e
a.o = f
a.p = f
a.z = h
h.y = c
h.w = c
h.x = f
h.v = l
e.y = c
e.w = c
e.x = f
e.v = l
assert e.w.y.t.o.w.txt == "c"