class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: D = None
        self.z: F = None
        self.w: C = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: G = None
        self.z: E = None
        self.q: B = None
        self.u: D = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: G = None
        self.z: E = None
        self.q: B = None
        self.u: D = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

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