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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: D = None
        self.o: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: E = None
        self.q: E = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: C = None
        self.z: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: F = None
        self.q: C = None
        self.y: I = None
        self.v: I = None
        self.w: G = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: E = None
        self.txt = txt

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

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

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

m.o = n
a.p = k
a.y = e
a.s = e
a.o = i
n.y = a
n.w = i
n.q = i
n.p = g
n.t = k
e.y = g
e.u = n
e.z = i
e.o = i
i.u = n
i.q = n
i.p = n
i.z = g
i.y = l
i.v = l
i.w = j
g.q = l
g.z = a
g.o = n
j.v = n
j.w = i
k.t = m
l.z = a
assert m.o.t.t.o.q.v.z.p.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: D = None
        self.o: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: E = None
        self.q: E = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: C = None
        self.z: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: F = None
        self.q: C = None
        self.y: I = None
        self.v: I = None
        self.w: G = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: E = None
        self.txt = txt

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

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

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

m.o = n
a.p = k
a.y = e
a.s = e
a.o = i
n.y = a
n.w = i
n.q = i
n.p = g
n.t = k
e.y = g
e.u = n
e.z = i
e.o = i
i.u = n
i.q = n
i.p = n
i.z = g
i.y = l
i.v = l
i.w = j
g.q = l
g.z = a
g.o = n
j.v = n
j.w = i
k.t = m
l.z = a
assert m.o.t.t.o.q.v.z.p.txt == "k"