class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: B = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: H = None
        self.s: J = None
        self.u: H = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: F = None
        self.s: F = None
        self.v: A = None
        self.z: F = None
        self.p: A = None
        self.w: F = None
        self.q: D = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: G = None
        self.q: C = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: C = None
        self.y: F = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: J = None
        self.y: G = None
        self.p: B = None
        self.z: I = None
        self.r: G = None
        self.u: A = None
        self.t: B = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: G = None
        self.w: H = None
        self.txt = txt

n = A("n")
g = B("g")
a = C("a")
c = D("c")
k = E("k")
m = F("m")
f = G("f")
e = H("e")
j = I("j")
h = J("h")

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: H = None
        self.s: J = None
        self.u: H = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: F = None
        self.s: F = None
        self.v: A = None
        self.z: F = None
        self.p: A = None
        self.w: F = None
        self.q: D = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: G = None
        self.q: C = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: C = None
        self.y: F = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: J = None
        self.y: G = None
        self.p: B = None
        self.z: I = None
        self.r: G = None
        self.u: A = None
        self.t: B = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: G = None
        self.w: H = None
        self.txt = txt

n = A("n")
g = B("g")
a = C("a")
c = D("c")
k = E("k")
m = F("m")
f = G("f")
e = H("e")
j = I("j")
h = J("h")

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