class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: F = None
        self.p: B = None
        self.x: B = None
        self.q: F = None
        self.s: H = None
        self.u: I = None
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: J = None
        self.s: E = None
        self.q: I = None
        self.z: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: F = None
        self.p: B = None
        self.x: B = None
        self.q: F = None
        self.s: H = None
        self.u: I = None
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: J = None
        self.s: E = None
        self.q: I = None
        self.z: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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