class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.t: G = None
        self.z: D = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.t: D = None
        self.q: A = None
        self.w: H = None
        self.y: D = None
        self.s: H = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: D = None
        self.r: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: G = None
        self.r: B = None
        self.u: G = None
        self.y: D = None
        self.txt = txt

h = A("h")
m = B("m")
j = C("j")
b = D("b")
i = E("i")
a = F("a")
l = G("l")
n = H("n")
k = D("k")

h.s = a
m.u = n
m.r = h
j.z = m
j.s = n
b.q = j
b.r = j
b.s = m
i.q = m
i.p = m
i.x = b
i.t = l
i.z = k
a.v = k
a.y = k
a.x = h
a.q = h
a.r = h
a.t = b
a.w = n
a.s = n
l.p = i
l.q = k
l.r = j
l.w = j
n.z = l
n.s = l
n.u = l
n.r = m
n.y = k
k.q = j
k.r = j
k.s = m
assert k.r.s.r.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.t: G = None
        self.z: D = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.t: D = None
        self.q: A = None
        self.w: H = None
        self.y: D = None
        self.s: H = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: D = None
        self.r: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: G = None
        self.r: B = None
        self.u: G = None
        self.y: D = None
        self.txt = txt

h = A("h")
m = B("m")
j = C("j")
b = D("b")
i = E("i")
a = F("a")
l = G("l")
n = H("n")
k = D("k")

h.s = a
m.u = n
m.r = h
j.z = m
j.s = n
b.q = j
b.r = j
b.s = m
i.q = m
i.p = m
i.x = b
i.t = l
i.z = k
a.v = k
a.y = k
a.x = h
a.q = h
a.r = h
a.t = b
a.w = n
a.s = n
l.p = i
l.q = k
l.r = j
l.w = j
n.z = l
n.s = l
n.u = l
n.r = m
n.y = k
k.q = j
k.r = j
k.s = m
assert k.r.s.r.u.r.txt == "m"