class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: E = None
        self.z: E = None
        self.v: C = None
        self.u: C = None
        self.w: I = None
        self.y: H = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: A = None
        self.s: F = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: A = None
        self.u: B = None
        self.q: H = None
        self.v: B = None
        self.r: B = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: A = None
        self.s: F = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: A = None
        self.u: B = None
        self.q: H = None
        self.v: B = None
        self.r: B = None
        self.y: G = None
        self.txt = txt

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

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