class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: D = None
        self.u: D = None
        self.y: A = None
        self.t: B = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: I = None
        self.v: B = None
        self.s: C = None
        self.p: G = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: G = None
        self.o: J = None
        self.v: D = None
        self.w: A = None
        self.q: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: H = None
        self.x: B = None
        self.q: J = None
        self.t: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: A = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: D = None
        self.u: D = None
        self.y: A = None
        self.t: B = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: I = None
        self.v: B = None
        self.s: C = None
        self.p: G = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: G = None
        self.o: J = None
        self.v: D = None
        self.w: A = None
        self.q: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: H = None
        self.x: B = None
        self.q: J = None
        self.t: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: A = None
        self.s: E = None
        self.txt = txt

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

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