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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: D = None
        self.x: H = None
        self.v: C = None
        self.y: C = None
        self.p: F = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

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

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

c = A("c")
l = B("l")
f = C("f")
n = D("n")
h = E("h")
e = F("e")
m = G("m")
d = H("d")
g = G("g")

c.s = e
c.z = m
l.u = f
l.z = f
l.q = d
l.o = c
l.t = e
l.w = e
f.s = l
n.s = h
n.z = c
h.o = d
h.x = d
h.u = n
h.t = n
h.v = f
h.y = f
h.p = e
h.s = e
e.u = c
e.s = d
m.v = g
m.o = l
m.w = d
m.x = f
m.p = e
m.y = n
m.q = n
d.o = l
d.t = l
d.r = h
d.u = f
d.x = e
d.w = g
d.v = c
g.v = m
g.o = l
g.w = d
g.x = f
g.p = e
g.y = n
g.q = n
assert m.w.x.s.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: D = None
        self.x: H = None
        self.v: C = None
        self.y: C = None
        self.p: F = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

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

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

c = A("c")
l = B("l")
f = C("f")
n = D("n")
h = E("h")
e = F("e")
m = G("m")
d = H("d")
g = G("g")

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