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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: G = None
        self.r: F = None
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.r: A = None
        self.s: G = None
        self.y: E = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.u: G = None
        self.o: F = None
        self.s: B = None
        self.y: C = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

n = A("n")
f = B("f")
a = C("a")
d = D("d")
e = E("e")
c = F("c")
j = G("j")
m = H("m")

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: G = None
        self.r: F = None
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.r: A = None
        self.s: G = None
        self.y: E = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.u: G = None
        self.o: F = None
        self.s: B = None
        self.y: C = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

n = A("n")
f = B("f")
a = C("a")
d = D("d")
e = E("e")
c = F("c")
j = G("j")
m = H("m")

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