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

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

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

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

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

b = A("b")
j = B("j")
m = C("m")
f = D("f")
k = E("k")
g = A("g")
n = B("n")

b.r = k
b.z = j
b.p = j
b.s = m
b.v = g
j.r = m
j.o = k
j.p = f
j.t = b
m.t = k
m.p = k
m.z = k
m.u = n
m.s = g
f.t = j
f.v = m
f.u = m
f.w = b
k.t = b
k.q = b
k.z = f
k.p = m
g.r = k
g.z = j
g.s = m
g.p = n
g.v = b
n.r = m
n.o = k
n.p = f
n.t = b
assert n.r.s.s.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: B = None
        self.s: C = None
        self.p: B = None
        self.v: A = None
        self.txt = txt

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

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

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

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

b = A("b")
j = B("j")
m = C("m")
f = D("f")
k = E("k")
g = A("g")
n = B("n")

b.r = k
b.z = j
b.p = j
b.s = m
b.v = g
j.r = m
j.o = k
j.p = f
j.t = b
m.t = k
m.p = k
m.z = k
m.u = n
m.s = g
f.t = j
f.v = m
f.u = m
f.w = b
k.t = b
k.q = b
k.z = f
k.p = m
g.r = k
g.z = j
g.s = m
g.p = n
g.v = b
n.r = m
n.o = k
n.p = f
n.t = b
assert n.r.s.s.u.r.txt == "m"