class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: G = None
        self.x: G = None
        self.z: I = None
        self.r: E = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: D = None
        self.u: D = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: F = None
        self.v: G = None
        self.q: I = None
        self.o: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: C = None
        self.p: A = None
        self.z: E = None
        self.t: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: F = None
        self.y: G = None
        self.t: G = None
        self.q: I = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: D = None
        self.u: D = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: F = None
        self.v: G = None
        self.q: I = None
        self.o: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: C = None
        self.p: A = None
        self.z: E = None
        self.t: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: F = None
        self.y: G = None
        self.t: G = None
        self.q: I = None
        self.p: E = None
        self.txt = txt

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

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