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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: E = None
        self.x: D = None
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

a = A("a")
k = B("k")
c = C("c")
g = D("g")
i = E("i")
h = F("h")
j = G("j")
m = H("m")
d = F("d")
b = D("b")

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: E = None
        self.x: D = None
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

a = A("a")
k = B("k")
c = C("c")
g = D("g")
i = E("i")
h = F("h")
j = G("j")
m = H("m")
d = F("d")
b = D("b")

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