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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: H = None
        self.w: H = None
        self.p: E = None
        self.x: H = None
        self.o: H = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.q: G = None
        self.p: B = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: H = None
        self.w: H = None
        self.p: E = None
        self.x: H = None
        self.o: H = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.q: G = None
        self.p: B = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

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

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