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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: G = None
        self.o: D = None
        self.t: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

f = A("f")
m = B("m")
a = C("a")
i = D("i")
k = E("k")
h = F("h")
n = G("n")
g = H("g")

f.s = a
m.s = i
m.o = i
m.w = n
m.t = f
m.q = f
a.o = f
a.z = f
a.q = k
a.r = k
a.v = k
a.x = n
i.z = k
i.w = k
i.s = g
i.v = g
i.o = h
i.t = h
i.u = a
i.q = a
k.s = n
k.v = n
k.z = a
k.w = f
h.t = a
h.r = k
h.y = i
h.w = i
h.p = i
h.s = n
h.q = n
h.v = m
n.z = m
g.o = n
g.v = m
g.u = m
g.t = h
assert h.w.o.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: G = None
        self.o: D = None
        self.t: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

f = A("f")
m = B("m")
a = C("a")
i = D("i")
k = E("k")
h = F("h")
n = G("n")
g = H("g")

f.s = a
m.s = i
m.o = i
m.w = n
m.t = f
m.q = f
a.o = f
a.z = f
a.q = k
a.r = k
a.v = k
a.x = n
i.z = k
i.w = k
i.s = g
i.v = g
i.o = h
i.t = h
i.u = a
i.q = a
k.s = n
k.v = n
k.z = a
k.w = f
h.t = a
h.r = k
h.y = i
h.w = i
h.p = i
h.s = n
h.q = n
h.v = m
n.z = m
g.o = n
g.v = m
g.u = m
g.t = h
assert h.w.o.t.x.txt == "n"