class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: C = None
        self.t: I = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.s: C = None
        self.w: G = None
        self.o: D = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: H = None
        self.t: E = None
        self.x: H = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: G = None
        self.p: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.s: C = None
        self.w: G = None
        self.o: D = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: H = None
        self.t: E = None
        self.x: H = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: G = None
        self.p: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

m.w = i
m.t = i
m.p = g
m.o = d
b.o = g
g.z = b
k.o = m
k.x = m
k.u = m
k.z = i
k.s = b
k.y = l
e.x = l
e.t = l
e.p = l
e.z = k
e.q = n
e.o = m
e.y = m
e.v = m
e.s = d
l.p = g
l.s = g
l.v = k
l.o = k
l.w = n
l.q = e
n.s = i
n.v = d
n.x = d
n.t = e
n.q = k
d.w = k
d.y = n
d.p = n
d.u = g
i.y = k
i.t = n
i.o = m
i.s = l
assert l.p.z.o.z.o.txt == "g"