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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: B = None
        self.q: A = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: C = None
        self.v: D = None
        self.u: J = None
        self.t: I = None
        self.r: I = None
        self.x: A = None
        self.s: E = None
        self.w: E = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.p: B = None
        self.z: D = None
        self.t: D = None
        self.q: J = None
        self.s: J = None
        self.u: E = None
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: B = None
        self.q: A = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: C = None
        self.v: D = None
        self.u: J = None
        self.t: I = None
        self.r: I = None
        self.x: A = None
        self.s: E = None
        self.w: E = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.p: B = None
        self.z: D = None
        self.t: D = None
        self.q: J = None
        self.s: J = None
        self.u: E = None
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

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

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