class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: G = None
        self.q: G = None
        self.p: E = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.t: C = None
        self.o: H = None
        self.x: E = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: G = None
        self.t: H = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: G = None
        self.p: G = None
        self.u: E = None
        self.q: G = None
        self.r: C = None
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.t: C = None
        self.o: H = None
        self.x: E = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: G = None
        self.t: H = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: G = None
        self.p: G = None
        self.u: E = None
        self.q: G = None
        self.r: C = None
        self.z: D = None
        self.txt = txt

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

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