class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: E = None
        self.q: D = None
        self.r: E = None
        self.u: H = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: E = None
        self.y: C = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: C = None
        self.t: B = None
        self.v: I = None
        self.x: B = None
        self.q: H = None
        self.r: H = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: A = None
        self.r: A = None
        self.o: F = None
        self.p: H = None
        self.w: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.x: D = None
        self.p: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: E = None
        self.y: C = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: C = None
        self.t: B = None
        self.v: I = None
        self.x: B = None
        self.q: H = None
        self.r: H = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: A = None
        self.r: A = None
        self.o: F = None
        self.p: H = None
        self.w: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.x: D = None
        self.p: F = None
        self.txt = txt

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

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

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