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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: A = None
        self.t: F = None
        self.v: F = None
        self.q: D = None
        self.u: A = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: H = None
        self.y: B = None
        self.r: E = None
        self.z: A = None
        self.u: E = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: A = None
        self.t: F = None
        self.v: F = None
        self.q: D = None
        self.u: A = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: H = None
        self.y: B = None
        self.r: E = None
        self.z: A = None
        self.u: E = None
        self.x: G = None
        self.txt = txt

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

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