class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: E = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: H = None
        self.x: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: B = None
        self.x: C = None
        self.w: E = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: H = None
        self.x: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: B = None
        self.x: C = None
        self.w: E = None
        self.t: C = None
        self.txt = txt

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

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