class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: G = None
        self.v: A = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: E = None
        self.z: H = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: A = None
        self.r: A = None
        self.y: G = None
        self.t: D = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.p: I = None
        self.x: G = None
        self.t: E = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: G = None
        self.v: A = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: E = None
        self.z: H = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: A = None
        self.r: A = None
        self.y: G = None
        self.t: D = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.p: I = None
        self.x: G = None
        self.t: E = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

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

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

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