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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: B = None
        self.t: H = None
        self.p: E = None
        self.w: B = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: B = None
        self.t: H = None
        self.p: E = None
        self.w: B = None
        self.u: H = None
        self.txt = txt

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

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

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

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