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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.r: G = None
        self.p: G = None
        self.v: G = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: B = None
        self.y: F = None
        self.u: F = None
        self.z: B = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

j = A("j")
k = B("k")
e = C("e")
l = D("l")
b = E("b")
d = F("d")
h = G("h")
n = H("n")

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.r: G = None
        self.p: G = None
        self.v: G = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: B = None
        self.y: F = None
        self.u: F = None
        self.z: B = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

j = A("j")
k = B("k")
e = C("e")
l = D("l")
b = E("b")
d = F("d")
h = G("h")
n = H("n")

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