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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: F = None
        self.p: A = None
        self.u: F = None
        self.s: C = None
        self.q: H = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: C = None
        self.z: F = None
        self.o: H = None
        self.q: G = None
        self.p: G = None
        self.v: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: C = None
        self.t: C = None
        self.r: D = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: F = None
        self.p: A = None
        self.u: F = None
        self.s: C = None
        self.q: H = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: C = None
        self.z: F = None
        self.o: H = None
        self.q: G = None
        self.p: G = None
        self.v: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: C = None
        self.t: C = None
        self.r: D = None
        self.p: F = None
        self.txt = txt

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

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