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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: H = None
        self.z: F = None
        self.x: F = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: G = None
        self.p: B = None
        self.s: G = None
        self.y: C = None
        self.x: D = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: H = None
        self.z: F = None
        self.x: F = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: G = None
        self.p: B = None
        self.s: G = None
        self.y: C = None
        self.x: D = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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