class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.q: E = None
        self.z: G = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: F = None
        self.u: H = None
        self.x: E = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: B = None
        self.q: G = None
        self.p: G = None
        self.v: C = None
        self.o: B = None
        self.x: B = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: F = None
        self.u: H = None
        self.x: E = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: B = None
        self.q: G = None
        self.p: G = None
        self.v: C = None
        self.o: B = None
        self.x: B = None
        self.z: A = None
        self.txt = txt

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

n.s = e
n.v = e
n.z = e
n.r = e
n.q = m
l.s = e
l.z = b
l.u = c
l.x = k
l.v = a
i.t = l
a.z = i
a.v = m
m.p = c
b.p = n
b.w = n
b.q = e
b.r = i
e.s = c
e.z = n
c.s = i
c.v = i
c.u = l
c.o = l
c.x = l
c.q = e
c.p = e
c.z = n
k.p = c
assert m.p.v.t.z.txt == "b"