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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: G = None
        self.r: I = None
        self.w: E = None
        self.x: B = None
        self.p: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: I = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: G = None
        self.r: I = None
        self.w: E = None
        self.x: B = None
        self.p: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: I = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: F = None
        self.s: E = None
        self.txt = txt

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

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

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