class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.r: G = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.o: H = None
        self.q: F = None
        self.v: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.p: E = None
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.o: H = None
        self.q: F = None
        self.v: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.p: E = None
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: E = None
        self.txt = txt

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

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

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