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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: B = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.p: B = None
        self.q: C = None
        self.txt = txt

e = A("e")
j = B("j")
k = C("k")
m = D("m")
a = E("a")
g = A("g")
f = A("f")
h = A("h")

e.t = k
e.r = h
e.u = m
e.p = j
j.o = h
k.x = a
k.w = j
k.s = j
m.r = g
m.w = k
a.v = k
a.q = k
a.t = m
a.p = j
g.t = k
g.r = h
g.u = m
g.p = j
f.t = k
f.r = g
f.u = m
f.p = j
h.t = k
h.r = e
h.u = m
h.p = j
assert j.o.t.x.t.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: A = None
        self.u: D = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: B = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.p: B = None
        self.q: C = None
        self.txt = txt

e = A("e")
j = B("j")
k = C("k")
m = D("m")
a = E("a")
g = A("g")
f = A("f")
h = A("h")

e.t = k
e.r = h
e.u = m
e.p = j
j.o = h
k.x = a
k.w = j
k.s = j
m.r = g
m.w = k
a.v = k
a.q = k
a.t = m
a.p = j
g.t = k
g.r = h
g.u = m
g.p = j
f.t = k
f.r = g
f.u = m
f.p = j
h.t = k
h.r = e
h.u = m
h.p = j
assert j.o.t.x.t.w.s.txt == "j"