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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: A = None
        self.y: E = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: H = None
        self.t: D = None
        self.v: D = None
        self.q: A = None
        self.u: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

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

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

e = A("e")
f = B("f")
i = C("i")
b = D("b")
h = E("h")
k = F("k")
c = G("c")
m = H("m")

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: A = None
        self.y: E = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: H = None
        self.t: D = None
        self.v: D = None
        self.q: A = None
        self.u: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

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

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

e = A("e")
f = B("f")
i = C("i")
b = D("b")
h = E("h")
k = F("k")
c = G("c")
m = H("m")

e.s = b
e.q = k
e.v = k
e.y = c
e.z = c
e.u = m
e.p = m
e.w = f
f.o = i
f.q = e
f.y = h
f.r = h
i.o = m
i.p = m
i.t = b
i.v = b
i.u = b
i.q = e
b.r = f
h.z = c
k.w = m
k.v = f
k.p = f
c.t = k
m.u = f
m.s = c
assert m.u.o.t.r.o.txt == "i"