class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: C = None
        self.z: E = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: E = None
        self.u: D = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

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

e = A("e")
f = B("f")
j = C("j")
c = D("c")
a = E("a")
b = A("b")
m = D("m")
d = E("d")

e.t = c
e.u = j
e.z = d
e.o = d
e.x = f
f.w = m
j.y = f
j.r = d
j.t = d
j.u = m
j.x = c
c.p = a
c.t = e
c.r = m
c.v = f
c.w = f
a.r = j
b.t = c
b.u = j
b.z = d
b.o = a
b.x = f
m.p = a
m.t = e
m.r = c
m.v = f
m.w = f
d.r = j
assert f.w.t.u.t.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: C = None
        self.z: E = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: E = None
        self.u: D = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

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

e = A("e")
f = B("f")
j = C("j")
c = D("c")
a = E("a")
b = A("b")
m = D("m")
d = E("d")

e.t = c
e.u = j
e.z = d
e.o = d
e.x = f
f.w = m
j.y = f
j.r = d
j.t = d
j.u = m
j.x = c
c.p = a
c.t = e
c.r = m
c.v = f
c.w = f
a.r = j
b.t = c
b.u = j
b.z = d
b.o = a
b.x = f
m.p = a
m.t = e
m.r = c
m.v = f
m.w = f
d.r = j
assert f.w.t.u.t.r.u.txt == "m"