class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: I = None
        self.s: D = None
        self.y: D = None
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: A = None
        self.y: A = None
        self.z: G = None
        self.q: E = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: I = None
        self.x: E = None
        self.u: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.r: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: A = None
        self.y: A = None
        self.z: G = None
        self.q: E = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: I = None
        self.x: E = None
        self.u: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.r: D = None
        self.t: B = None
        self.txt = txt

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

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