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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: G = None
        self.s: A = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: H = None
        self.z: B = None
        self.u: G = None
        self.x: H = None
        self.s: J = None
        self.p: J = None
        self.r: H = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.x: I = None
        self.q: E = None
        self.r: F = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: C = None
        self.y: E = None
        self.s: F = None
        self.u: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: H = None
        self.r: F = None
        self.z: F = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: G = None
        self.s: A = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: H = None
        self.z: B = None
        self.u: G = None
        self.x: H = None
        self.s: J = None
        self.p: J = None
        self.r: H = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.x: I = None
        self.q: E = None
        self.r: F = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: C = None
        self.y: E = None
        self.s: F = None
        self.u: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: H = None
        self.r: F = None
        self.z: F = None
        self.w: E = None
        self.txt = txt

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

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