class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: F = None
        self.s: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: I = None
        self.t: I = None
        self.q: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: C = None
        self.r: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: F = None
        self.s: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: I = None
        self.t: I = None
        self.q: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: C = None
        self.r: F = None
        self.txt = txt

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

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

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