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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: B = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: E = None
        self.o: E = None
        self.r: C = None
        self.v: E = None
        self.w: A = None
        self.p: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: D = None
        self.y: B = None
        self.v: C = None
        self.u: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.o: C = None
        self.r: E = None
        self.q: C = None
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: B = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: E = None
        self.o: E = None
        self.r: C = None
        self.v: E = None
        self.w: A = None
        self.p: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: D = None
        self.y: B = None
        self.v: C = None
        self.u: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.o: C = None
        self.r: E = None
        self.q: C = None
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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