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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: F = None
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: A = None
        self.x: E = None
        self.txt = txt

m = A("m")
i = B("i")
c = C("c")
a = D("a")
d = E("d")
n = F("n")
l = G("l")
f = H("f")
b = I("b")

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: F = None
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: A = None
        self.x: E = None
        self.txt = txt

m = A("m")
i = B("i")
c = C("c")
a = D("a")
d = E("d")
n = F("n")
l = G("l")
f = H("f")
b = I("b")

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