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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: H = None
        self.t: F = None
        self.y: F = None
        self.s: E = None
        self.z: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.x: C = None
        self.u: C = None
        self.v: G = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: C = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: C = None
        self.u: E = None
        self.v: B = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: H = None
        self.t: F = None
        self.y: F = None
        self.s: E = None
        self.z: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.x: C = None
        self.u: C = None
        self.v: G = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: C = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: C = None
        self.u: E = None
        self.v: B = None
        self.x: B = None
        self.txt = txt

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

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