class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.q: E = None
        self.z: B = None
        self.p: E = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: H = None
        self.z: H = None
        self.v: C = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: E = None
        self.w: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: H = None
        self.z: H = None
        self.v: C = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: E = None
        self.w: F = None
        self.y: H = None
        self.txt = txt

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

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

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