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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: H = None
        self.p: G = None
        self.r: F = None
        self.w: G = None
        self.v: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.r: C = None
        self.s: G = None
        self.v: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: C = None
        self.r: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: H = None
        self.p: G = None
        self.r: F = None
        self.w: G = None
        self.v: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.r: C = None
        self.s: G = None
        self.v: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: C = None
        self.r: G = None
        self.txt = txt

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

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